aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/types
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-08-12 19:54:46 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2022-08-12 19:54:46 +0200
commitd22c3b0c257f5daf5b401988a35ab9ce981a2341 (patch)
tree0a661c927c37b52197326d1c05e211daf9bd19e5 /subprojects/frontend/types
parentfix(language): rule parsing test (diff)
downloadrefinery-d22c3b0c257f5daf5b401988a35ab9ce981a2341.tar.gz
refinery-d22c3b0c257f5daf5b401988a35ab9ce981a2341.tar.zst
refinery-d22c3b0c257f5daf5b401988a35ab9ce981a2341.zip
refactor(frontend): move from Webpack to Vite
Also overhaulds the building and linting for frontend assets.
Diffstat (limited to 'subprojects/frontend/types')
-rw-r--r--subprojects/frontend/types/ImportMeta.d.ts9
-rw-r--r--subprojects/frontend/types/grammar.d.ts5
-rw-r--r--subprojects/frontend/types/node/@lezer-generator-rollup.d.ts7
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 @@
1interface 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 @@
1declare 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"`.
3declare module '@lezer/generator/rollup' {
4 import type { Plugin } from 'rollup';
5
6 export function lezer(): Plugin;
7}