mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-17 04:01:49 -04:00
fix: add more explicit return types (#49567)
This commit is contained in:
committed by
GitHub
parent
5528ec39a2
commit
66438c271f
@@ -5,7 +5,7 @@ export async function auth0Verify(
|
||||
this: FastifyInstance,
|
||||
request: FastifyRequest,
|
||||
reply: FastifyReply
|
||||
) {
|
||||
): Promise<void> {
|
||||
await this.authenticate(request, reply);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ export function testMiddleware(
|
||||
req: MiddieRequest,
|
||||
res: MiddieResponse,
|
||||
next: NextFunction
|
||||
) {
|
||||
): void {
|
||||
console.log('Test middleware running');
|
||||
console.log(req.headers);
|
||||
console.log(req.query);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { randomBytes, createHash } from 'crypto';
|
||||
|
||||
export function base64URLEncode(buf: Buffer) {
|
||||
export function base64URLEncode(buf: Buffer): string {
|
||||
return buf
|
||||
.toString('base64')
|
||||
.replace(/\+/g, '-')
|
||||
|
||||
@@ -72,7 +72,7 @@ export class Header extends React.Component<
|
||||
}
|
||||
|
||||
// elementToFocus must be a link in the language menu
|
||||
showLanguageMenu(elementToFocus: HTMLButtonElement | null) {
|
||||
showLanguageMenu(elementToFocus: HTMLButtonElement | null): void {
|
||||
this.setState({ isLanguageMenuDisplayed: true }, () =>
|
||||
elementToFocus?.focus()
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user