Skip to content

Commit

Permalink
work around acorn types (#10301)
Browse files Browse the repository at this point in the history
* work around acorn types

* ugh

---------

Co-authored-by: Rich Harris <[email protected]>
  • Loading branch information
Rich-Harris and Rich-Harris authored Jan 26, 2024
1 parent 4d8ce93 commit 452dc4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/svelte/src/compiler/parse/acorn-types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module 'acorn' {
export function isIdentifierStart(code: number, astral: boolean): boolean;
export function isIdentifierChar(code: number, astral: boolean): boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export async function load({ fetch, params, url }) {
const res = await fetch(`/repl/api/${params.id}.json`);

if (!res.ok) {
throw error(res.status);
throw error(/** @type {any} */ (res.status));
}

const gist = await res.json();
Expand Down

0 comments on commit 452dc4a

Please sign in to comment.