diff --git a/package.json b/package.json index 191547d7..8bd9eea2 100644 --- a/package.json +++ b/package.json @@ -42,10 +42,10 @@ "eslint-config-google": "^0.14.0", "mocha": "^9.1.3", "nyc": "^15.1.0", - "typedoc": "^0.25.13", + "typedoc": "^0.26.5", "typedoc-plugin-mdn-links": "^3.1.28", - "typedoc-plugin-missing-exports": "^2.2.0", - "typescript": "^5.1.3" + "typedoc-plugin-missing-exports": "^3.0.0", + "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/src/util.ts b/src/util.ts index 9774563f..4d1a276f 100644 --- a/src/util.ts +++ b/src/util.ts @@ -229,6 +229,8 @@ export function serverUse(module, id: string, options?: unknown) { return this.use(plugin, options); } +type Plugin = (pluginHost: T, options: O) => void; + /** * Use plugin * @@ -236,9 +238,9 @@ export function serverUse(module, id: string, options?: unknown) { * @param options - Optional options passed to plugin * @returns */ -export function use(plugin: (arg0: unknown, options?: unknown) => void, options?: unknown) { +export function use(this: T, plugin: Plugin, options?: O) { // Don't include a plugin more than once - var plugins = this._plugins || (this._plugins = []); + var plugins = (this as any)._plugins || ((this as any)._plugins = []); if (plugins.indexOf(plugin) === -1) { plugins.push(plugin); plugin(this, options); 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,