mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-24 08:28:11 +08:00
Switch to Node.js 16 LTS, upgrade TypeScript, ESLint, and other dependencies (#395)
* Upgrade TypeScript, ESLint, and other dependencies This also cleans up various other files where newer ESLint rules complained * Set CI and CD to use Node.js version 16 * Small tweak * Fix CD version printing * Add nvm version for Cloudflare Pages
This commit is contained in:
@@ -17,7 +17,7 @@ export function panicProxy<T extends object>(module: T): T {
|
||||
return function (...args: any) {
|
||||
let result;
|
||||
try {
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error TypeScript does not know what `this` is, since it should be able to be anything
|
||||
result = targetValue.apply(this, args);
|
||||
} catch (err: any) {
|
||||
// Suppress `unreachable` WebAssembly.RuntimeError exceptions
|
||||
|
||||
@@ -98,16 +98,25 @@ function parseResponse(responseType: string, data: any): Response {
|
||||
}
|
||||
|
||||
export type Response =
|
||||
| DocumentChanged
|
||||
| DisplayFolderTreeStructure
|
||||
| SetActiveTool
|
||||
| SetActiveDocument
|
||||
| UpdateOpenDocumentsList
|
||||
| UpdateCanvas
|
||||
| UpdateScrollbars
|
||||
| UpdateRulers
|
||||
| UpdateLayer
|
||||
| DocumentChanged
|
||||
| DisplayFolderTreeStructure
|
||||
| UpdateWorkingColors
|
||||
| SetCanvasZoom
|
||||
| SetCanvasRotation;
|
||||
| SetCanvasRotation
|
||||
| ExportDocument
|
||||
| SaveDocument
|
||||
| OpenDocumentBrowse
|
||||
| UpdateWorkingColors
|
||||
| DisplayError
|
||||
| DisplayPanic
|
||||
| DisplayConfirmationToCloseDocument
|
||||
| DisplayConfirmationToCloseAllDocuments;
|
||||
|
||||
export interface UpdateOpenDocumentsList {
|
||||
open_documents: Array<string>;
|
||||
@@ -191,7 +200,9 @@ function newDisplayConfirmationToCloseDocument(input: any): DisplayConfirmationT
|
||||
};
|
||||
}
|
||||
|
||||
function newDisplayConfirmationToCloseAllDocuments(_input: any): {} {
|
||||
export type DisplayConfirmationToCloseAllDocuments = Record<string, never>;
|
||||
|
||||
function newDisplayConfirmationToCloseAllDocuments(_input: any): DisplayConfirmationToCloseAllDocuments {
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -252,12 +263,12 @@ function newSaveDocument(input: any): SaveDocument {
|
||||
};
|
||||
}
|
||||
|
||||
export type OpenDocumentBrowse = {};
|
||||
export type OpenDocumentBrowse = Record<string, never>;
|
||||
function newOpenDocumentBrowse(_: any): OpenDocumentBrowse {
|
||||
return {};
|
||||
}
|
||||
|
||||
export type DocumentChanged = {};
|
||||
export type DocumentChanged = Record<string, never>;
|
||||
function newDocumentChanged(_: any): DocumentChanged {
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user