diff options
Diffstat (limited to 'subprojects/frontend/types')
-rw-r--r-- | subprojects/frontend/types/ImportMeta.d.ts | 9 | ||||
-rw-r--r-- | subprojects/frontend/types/grammar.d.ts | 5 | ||||
-rw-r--r-- | subprojects/frontend/types/node/@lezer-generator-rollup.d.ts | 7 |
3 files changed, 21 insertions, 0 deletions
diff --git a/subprojects/frontend/types/ImportMeta.d.ts b/subprojects/frontend/types/ImportMeta.d.ts new file mode 100644 index 00000000..2008e268 --- /dev/null +++ b/subprojects/frontend/types/ImportMeta.d.ts | |||
@@ -0,0 +1,9 @@ | |||
1 | interface ImportMeta { | ||
2 | env: { | ||
3 | DEV: boolean; | ||
4 | MODE: string; | ||
5 | PROD: boolean; | ||
6 | VITE_PACKAGE_NAME: string; | ||
7 | VITE_PACKAGE_VERSION: string; | ||
8 | }; | ||
9 | } | ||
diff --git a/subprojects/frontend/types/grammar.d.ts b/subprojects/frontend/types/grammar.d.ts new file mode 100644 index 00000000..1480085b --- /dev/null +++ b/subprojects/frontend/types/grammar.d.ts | |||
@@ -0,0 +1,5 @@ | |||
1 | declare module '*.grammar' { | ||
2 | import type { LRParser } from '@lezer/lr'; | ||
3 | |||
4 | export const parser: LRParser; | ||
5 | } | ||
diff --git a/subprojects/frontend/types/node/@lezer-generator-rollup.d.ts b/subprojects/frontend/types/node/@lezer-generator-rollup.d.ts new file mode 100644 index 00000000..dea39ec9 --- /dev/null +++ b/subprojects/frontend/types/node/@lezer-generator-rollup.d.ts | |||
@@ -0,0 +1,7 @@ | |||
1 | // We have to explicitly redeclare the type of the `./rollup` ESM export of `@lezer/generator`, | ||
2 | // because TypeScript can't find it on its own even with `"moduleResolution": "Node16"`. | ||
3 | declare module '@lezer/generator/rollup' { | ||
4 | import type { Plugin } from 'rollup'; | ||
5 | |||
6 | export function lezer(): Plugin; | ||
7 | } | ||