chore: import node types (#44172)
* chore: add @types/node to client * fix: update declaration with node 16 changes
This commit is contained in:
committed by
GitHub
parent
355341908b
commit
d489aa307e
96243
client/package-lock.json
generated
96243
client/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -136,6 +136,7 @@
|
||||
"@types/jest": "26.0.24",
|
||||
"@types/loadable__component": "5.13.4",
|
||||
"@types/lodash-es": "4.17.5",
|
||||
"@types/node": "^16.11.7",
|
||||
"@types/prismjs": "1.16.6",
|
||||
"@types/psl": "1.1.0",
|
||||
"@types/reach__router": "1.3.9",
|
||||
|
28
client/src/declarations.d.ts
vendored
28
client/src/declarations.d.ts
vendored
@ -15,19 +15,17 @@ declare module '*.png' {
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare namespace NodeJS {
|
||||
interface Global {
|
||||
MathJax: {
|
||||
Hub: {
|
||||
Config: (attributes: {
|
||||
tex2jax: {
|
||||
inlineMath: Array<string[]>;
|
||||
processEscapes: boolean;
|
||||
processClass: string;
|
||||
};
|
||||
}) => void;
|
||||
Queue: (attributes: unknown[]) => void;
|
||||
// This has to be declared as var, not let or const, to be added to globalThis
|
||||
// eslint-disable-next-line no-var
|
||||
declare var MathJax: {
|
||||
Hub: {
|
||||
Config: (attributes: {
|
||||
tex2jax: {
|
||||
inlineMath: Array<string[]>;
|
||||
processEscapes: boolean;
|
||||
processClass: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
}) => void;
|
||||
Queue: (attributes: unknown[]) => void;
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user