Skip to content

Commit

Permalink
fix syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm authored Dec 9, 2022
1 parent 4f24b46 commit ca3b8a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sites/kit.svelte.dev/src/lib/docs/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,12 +463,12 @@ function convert_to_ts(js_code, indent = '', offset = '') {
code.overwrite(
node.getStart(),
node.name.getEnd(),
`${is_export ? 'export ' : ''}const ${node.name.getText()} = ${
`${is_export ? 'export ' : ''}const ${node.name.getText()} = (${
is_async ? 'async ' : ''
}`
);
code.appendLeft(node.body.getStart(), '=> ');
code.appendLeft(node.body.getEnd(), ` satisfies ${name};`);
code.appendLeft(node.body.getEnd(), `) satisfies ${name};`);

modified = true;
} else if (
Expand Down
4 changes: 2 additions & 2 deletions sites/kit.svelte.dev/src/lib/docs/server/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ export function GET(event) {
import { json } from '@sveltejs/kit';
import type { RequestHandler } from './$types';
export const GET = (event) => {
export const GET = ((event) => {
// log all headers
console.log(...event.request.headers);
return json({
// retrieve a specific header
userAgent: event.request.headers.get('user-agent')
});
} satisfies RequestHandler;
}) satisfies RequestHandler;
\`\`\`
etc etc
Expand Down

0 comments on commit ca3b8a7

Please sign in to comment.