升级ts到5版本

This commit is contained in:
Xu Chang 2023-09-14 17:44:23 +08:00
parent d677cc9aba
commit e6f996c280
7 changed files with 929 additions and 1245 deletions

6
es/types/type.d.ts vendored
View File

@ -1,6 +1,6 @@
import { NodeId } from "oak-domain/lib/types/Demand"; import { NodeId } from "oak-domain/lib/types/Demand";
import { EntityShape } from "oak-domain/lib/types/Entity"; import { EntityShape } from "oak-domain/lib/types/Entity";
export declare type RowNode = { export type RowNode = {
$txnId?: string; $txnId?: string;
$next?: Partial<EntityShape & { $next?: Partial<EntityShape & {
[K: string]: any; [K: string]: any;
@ -9,7 +9,7 @@ export declare type RowNode = {
$nextNode?: RowNode; $nextNode?: RowNode;
$path?: string; $path?: string;
}; };
export declare type NodeDict = { export type NodeDict = {
[K in NodeId]: EntityShape; [K in NodeId]: EntityShape;
}; };
export declare type ExprResolveFn = (nodeDict: NodeDict) => ExprResolveFn | any; export type ExprResolveFn = (nodeDict: NodeDict) => ExprResolveFn | any;

View File

@ -1,6 +1,6 @@
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.TreeStore = void 0; exports.TreeStore = void 0;
var tslib_1 = require("tslib"); const tslib_1 = require("tslib");
var store_1 = tslib_1.__importDefault(require("./store")); const store_1 = tslib_1.__importDefault(require("./store"));
exports.TreeStore = store_1.default; exports.TreeStore = store_1.default;

File diff suppressed because it is too large Load Diff

6
lib/types/type.d.ts vendored
View File

@ -1,6 +1,6 @@
import { NodeId } from "oak-domain/lib/types/Demand"; import { NodeId } from "oak-domain/lib/types/Demand";
import { EntityShape } from "oak-domain/lib/types/Entity"; import { EntityShape } from "oak-domain/lib/types/Entity";
export declare type RowNode = { export type RowNode = {
$txnId?: string; $txnId?: string;
$next?: Partial<EntityShape & { $next?: Partial<EntityShape & {
[K: string]: any; [K: string]: any;
@ -9,7 +9,7 @@ export declare type RowNode = {
$nextNode?: RowNode; $nextNode?: RowNode;
$path?: string; $path?: string;
}; };
export declare type NodeDict = { export type NodeDict = {
[K in NodeId]: EntityShape; [K in NodeId]: EntityShape;
}; };
export declare type ExprResolveFn = (nodeDict: NodeDict) => ExprResolveFn | any; export type ExprResolveFn = (nodeDict: NodeDict) => ExprResolveFn | any;

View File

@ -31,7 +31,7 @@
"@types/fs-extra": "^9.0.13", "@types/fs-extra": "^9.0.13",
"@types/lodash": "^4.14.168", "@types/lodash": "^4.14.168",
"@types/mocha": "^8.2.0", "@types/mocha": "^8.2.0",
"@types/node": "^14.18.16", "@types/node": "^20.6.0",
"@types/react": "^17.0.2", "@types/react": "^17.0.2",
"@types/uuid": "^8.3.0", "@types/uuid": "^8.3.0",
"assert": "^2.0.0", "assert": "^2.0.0",
@ -40,6 +40,6 @@
"mocha": "^8.2.1", "mocha": "^8.2.1",
"ts-node": "~10.9.1", "ts-node": "~10.9.1",
"tslib": "^2.4.0", "tslib": "^2.4.0",
"typescript": "~4.7.4" "typescript": "^5.2.2"
} }
} }

View File

@ -28,8 +28,9 @@
"downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
/* Strict Type-Checking Options */ /* Strict Type-Checking Options */
"strict": true, /* Enable all strict type-checking options. */ // "strict": true, /* Enable all strict type-checking options. */
"importHelpers": true, "importHelpers": true,
"skipLibCheck": true,
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* Enable strict null checks. */ // "strictNullChecks": true, /* Enable strict null checks. */
// "strictFunctionTypes": true, /* Enable strict checking of function types. */ // "strictFunctionTypes": true, /* Enable strict checking of function types. */

View File

@ -3,7 +3,7 @@
"jsx": "preserve", "jsx": "preserve",
/* Basic Options */ /* Basic Options */
// "incremental": true, /* Enable incremental compilation */ // "incremental": true, /* Enable incremental compilation */
"target": "ES5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ "target": "ESNext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"lib": [ "lib": [
"dom", "dom",
@ -28,7 +28,7 @@
"downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
/* Strict Type-Checking Options */ /* Strict Type-Checking Options */
"strict": true, /* Enable all strict type-checking options. */ // "strict": true, /* Enable all strict type-checking options. */
"importHelpers": true, "importHelpers": true,
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* Enable strict null checks. */ // "strictNullChecks": true, /* Enable strict null checks. */
@ -51,6 +51,7 @@
// "types": [], /* Type declaration files to be included in compilation. */ // "types": [], /* Type declaration files to be included in compilation. */
"allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
"skipLibCheck": true,
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
/* Source Map Options */ /* Source Map Options */