From cd397f6cee132e23da46e1e84c23e88724fbc7ce Mon Sep 17 00:00:00 2001 From: Eric Hwang Date: Mon, 22 Jul 2024 14:29:42 -0700 Subject: [PATCH] Fix errors with TS 5.5, switch typescript to '~' dependency specifier since TypeScript doesn't use semver - Remove noImplicitUseStrict compiler flag, since TS 5.5 no longer supports it - Put preserve="true" on triple-slash reference directives used to load types for server-only model methods, since TS 5.5 strips the directives without the new preserve attribute --- package.json | 2 +- src/Model/index.ts | 4 ++-- tsconfig.json | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 191547d7..68bb3cde 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "typedoc": "^0.25.13", "typedoc-plugin-mdn-links": "^3.1.28", "typedoc-plugin-missing-exports": "^2.2.0", - "typescript": "^5.1.3" + "typescript": "~5.5" }, "bugs": { "url": "https://github.com/derbyjs/racer/issues" diff --git a/src/Model/index.ts b/src/Model/index.ts index 435e907c..9c7e143c 100644 --- a/src/Model/index.ts +++ b/src/Model/index.ts @@ -1,5 +1,5 @@ -/// -/// +/// +/// import { serverRequire } from '../util'; export { Model, ChildModel, RootModel, type ModelOptions, type UUID, type DefualtType } from './Model'; diff --git a/tsconfig.json b/tsconfig.json index f75922da..2fa026cd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,8 @@ { "compilerOptions": { "allowJs": true, - "ignoreDeprecations": "5.0", "lib":[], "module": "CommonJS", - "noImplicitUseStrict": true, "outDir": "lib", "target": "ES5", "sourceMap": false,