Skip to content

Commit d77ba96

Browse files
committed
chore: update typescript
1 parent 7d2be81 commit d77ba96

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+457
-521
lines changed

dist/js/constants.d.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
export namespace coefficients {
2-
const EV_TO_RY: number;
3-
const BOHR_TO_ANGSTROM: number;
4-
const ANGSTROM_TO_BOHR: number;
5-
const EV_A_TO_RY_BOHR: number;
2+
let EV_TO_RY: number;
3+
let BOHR_TO_ANGSTROM: number;
4+
let ANGSTROM_TO_BOHR: number;
5+
let EV_A_TO_RY_BOHR: number;
66
}
77
export namespace tolerance {
8-
const length: number;
9-
const lengthAngstrom: number;
10-
const pointsDistance: number;
8+
let length: number;
9+
let lengthAngstrom: number;
10+
let pointsDistance: number;
1111
}
1212
export namespace units {
13-
const bohr: string;
14-
const angstrom: string;
15-
const degree: string;
16-
const radian: string;
17-
const alat: string;
13+
let bohr: string;
14+
let angstrom: string;
15+
let degree: string;
16+
let radian: string;
17+
let alat: string;
1818
}
1919
export namespace ATOMIC_COORD_UNITS {
20-
const crystal: string;
21-
const cartesian: string;
20+
let crystal: string;
21+
let cartesian: string;
2222
}
2323
export const HASH_TOLERANCE: 3;
2424
declare namespace _default {

dist/js/context/mixins.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ export declare function MaterialContextMixin<T extends Constructor>(superclass:
1717
_material: Material;
1818
extraData?: {
1919
materialHash: string;
20-
} | undefined;
21-
isEdited?: boolean | undefined;
20+
};
21+
isEdited?: boolean;
2222
readonly isEditedIsSetToFalseOnMaterialUpdate: boolean;
2323
updateMaterialHash(): void;
2424
readonly isMaterialCreatedDefault: boolean;
@@ -46,10 +46,10 @@ export declare function MethodDataContextMixin<T extends Constructor>(superclass
4646
[x: string]: any;
4747
_methodData: any;
4848
isEdited: boolean;
49-
methodDataHash?: string | undefined;
49+
methodDataHash?: string;
5050
extraData?: {
51-
methodDataHash?: string | undefined;
52-
} | undefined;
51+
methodDataHash?: string;
52+
};
5353
_initMethodDataHash(): void;
5454
readonly methodData: any;
5555
readonly isMethodDataUpdated: boolean;

dist/js/context/mixins.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
33
return (mod && mod.__esModule) ? mod : { "default": mod };
44
};
55
Object.defineProperty(exports, "__esModule", { value: true });
6-
exports.JobContextMixin = exports.WorkflowContextMixin = exports.MethodDataContextMixin = exports.MaterialsContextMixin = exports.MaterialsSetContextMixin = exports.MaterialContextMixin = exports.ApplicationContextMixin = void 0;
6+
exports.ApplicationContextMixin = ApplicationContextMixin;
7+
exports.MaterialContextMixin = MaterialContextMixin;
8+
exports.MaterialsSetContextMixin = MaterialsSetContextMixin;
9+
exports.MaterialsContextMixin = MaterialsContextMixin;
10+
exports.MethodDataContextMixin = MethodDataContextMixin;
11+
exports.WorkflowContextMixin = WorkflowContextMixin;
12+
exports.JobContextMixin = JobContextMixin;
713
const crypto_js_1 = __importDefault(require("crypto-js"));
814
const utils_1 = require("../entity/set/ordered/utils");
915
function ApplicationContextMixin(superclass) {
@@ -25,7 +31,6 @@ function ApplicationContextMixin(superclass) {
2531
}
2632
};
2733
}
28-
exports.ApplicationContextMixin = ApplicationContextMixin;
2934
function MaterialContextMixin(superclass) {
3035
return class MaterialContextMixin extends superclass {
3136
constructor(...args) {
@@ -64,7 +69,6 @@ function MaterialContextMixin(superclass) {
6469
}
6570
};
6671
}
67-
exports.MaterialContextMixin = MaterialContextMixin;
6872
function MaterialsSetContextMixin(superclass) {
6973
return class MaterialsSetContextMixin extends superclass {
7074
constructor(...params) {
@@ -82,7 +86,6 @@ function MaterialsSetContextMixin(superclass) {
8286
}
8387
};
8488
}
85-
exports.MaterialsSetContextMixin = MaterialsSetContextMixin;
8689
function MaterialsContextMixin(superclass) {
8790
return class MaterialsContextMixin extends superclass {
8891
constructor(...params) {
@@ -103,7 +106,6 @@ function MaterialsContextMixin(superclass) {
103106
}
104107
};
105108
}
106-
exports.MaterialsContextMixin = MaterialsContextMixin;
107109
function MethodDataContextMixin(superclass) {
108110
return class extends superclass {
109111
constructor(...params) {
@@ -142,7 +144,6 @@ function MethodDataContextMixin(superclass) {
142144
}
143145
};
144146
}
145-
exports.MethodDataContextMixin = MethodDataContextMixin;
146147
function WorkflowContextMixin(superclass) {
147148
return class extends superclass {
148149
constructor(...params) {
@@ -156,7 +157,6 @@ function WorkflowContextMixin(superclass) {
156157
}
157158
};
158159
}
159-
exports.WorkflowContextMixin = WorkflowContextMixin;
160160
function JobContextMixin(superclass) {
161161
return class extends superclass {
162162
constructor(...params) {
@@ -170,4 +170,3 @@ function JobContextMixin(superclass) {
170170
}
171171
};
172172
}
173-
exports.JobContextMixin = JobContextMixin;

dist/js/context/registry.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export class ContextProviderRegistryContainer {
22
_providers: any[];
3-
set providers(arg: any[]);
3+
set providers(p: any[]);
44
get providers(): any[];
55
addProvider({ name, instance }: {
66
name: any;

dist/js/entity/in_memory.js

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
1515
}) : function(o, v) {
1616
o["default"] = v;
1717
});
18-
var __importStar = (this && this.__importStar) || function (mod) {
19-
if (mod && mod.__esModule) return mod;
20-
var result = {};
21-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22-
__setModuleDefault(result, mod);
23-
return result;
24-
};
18+
var __importStar = (this && this.__importStar) || (function () {
19+
var ownKeys = function(o) {
20+
ownKeys = Object.getOwnPropertyNames || function (o) {
21+
var ar = [];
22+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23+
return ar;
24+
};
25+
return ownKeys(o);
26+
};
27+
return function (mod) {
28+
if (mod && mod.__esModule) return mod;
29+
var result = {};
30+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31+
__setModuleDefault(result, mod);
32+
return result;
33+
};
34+
})();
2535
var __importDefault = (this && this.__importDefault) || function (mod) {
2636
return (mod && mod.__esModule) ? mod : { "default": mod };
2737
};
@@ -35,7 +45,7 @@ const clone_1 = require("../utils/clone");
3545
var ValidationErrorCode;
3646
(function (ValidationErrorCode) {
3747
ValidationErrorCode["IN_MEMORY_ENTITY_DATA_INVALID"] = "IN_MEMORY_ENTITY_DATA_INVALID";
38-
})(ValidationErrorCode = exports.ValidationErrorCode || (exports.ValidationErrorCode = {}));
48+
})(ValidationErrorCode || (exports.ValidationErrorCode = ValidationErrorCode = {}));
3949
class EntityError extends Error {
4050
constructor({ code, details }) {
4151
super(code);

dist/js/entity/index.js

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
1515
}) : function(o, v) {
1616
o["default"] = v;
1717
});
18-
var __importStar = (this && this.__importStar) || function (mod) {
19-
if (mod && mod.__esModule) return mod;
20-
var result = {};
21-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22-
__setModuleDefault(result, mod);
23-
return result;
24-
};
18+
var __importStar = (this && this.__importStar) || (function () {
19+
var ownKeys = function(o) {
20+
ownKeys = Object.getOwnPropertyNames || function (o) {
21+
var ar = [];
22+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23+
return ar;
24+
};
25+
return ownKeys(o);
26+
};
27+
return function (mod) {
28+
if (mod && mod.__esModule) return mod;
29+
var result = {};
30+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31+
__setModuleDefault(result, mod);
32+
return result;
33+
};
34+
})();
2535
Object.defineProperty(exports, "__esModule", { value: true });
2636
exports.FlowchartItemMixin = exports.FlowchartEntityMixin = exports.ContextAndRenderFieldsMixin = exports.OrderedInMemoryEntityInSetMixin = exports.OrderedInMemoryEntitySetMixin = exports.InMemoryEntityInSetMixin = exports.InMemoryEntitySetMixin = exports.selectorsForEntitySet = exports.constructEntitySetFactoryByConfig = exports.ENTITY_SET_TYPES = exports.InMemoryEntitySet = exports.HashedInputArrayMixin = exports.RuntimeContextFieldMixin = exports.RuntimeItemsMixin = exports.NamedEntityMixin = exports.HasScopeTrackMixin = exports.TaggableMixin = exports.HasMetadataMixin = exports.HasDescriptionMixin = exports.DefaultableMixin = exports.HasConsistencyChecksMixin = exports.HasConsistencyChecksHasMetadataNamedDefaultableInMemoryEntity = exports.NamedDefaultableRepetitionRuntimeItemsImportantSettingsContextAndRenderHashedInMemoryEntity = exports.NamedDefaultableRepetitionImportantSettingsInMemoryEntity = exports.NamedDefaultableRepetitionContextAndRenderInMemoryEntity = exports.HasMetadataNamedDefaultableInMemoryEntity = exports.NamedDefaultableInMemoryEntity = exports.DefaultableInMemoryEntity = exports.NamedInMemoryEntity = exports.InMemoryEntity = void 0;
2737
const in_memory_1 = require("./in_memory");

dist/js/entity/mixins/context.d.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ export declare function ContextAndRenderFieldsMixin<T extends InMemoryEntityCons
1414
render(_context?: AnyObject): void;
1515
_json: AnyObject;
1616
prop<T_1 = undefined>(name: string, defaultValue: T_1): T_1;
17-
prop<T_2 = undefined>(name: string): T_2 | undefined;
17+
prop<T_1 = undefined>(name: string): T_1 | undefined;
1818
setProp(name: string, value: unknown): void;
1919
unsetProp(name: string): void;
20-
setProps(json?: AnyObject): any;
20+
setProps(json?: AnyObject): /*elided*/ any;
2121
toJSON(exclude?: string[]): AnyObject;
2222
toJSONSafe(exclude?: string[]): AnyObject;
2323
toJSONQuick(exclude?: string[]): AnyObject;
24-
clone(extraContext?: object | undefined): any;
24+
clone(extraContext?: object): /*elided*/ any;
2525
validate(): void;
2626
clean(config: AnyObject): AnyObject;
2727
isValid(): boolean;
@@ -46,14 +46,14 @@ export declare function DomainContextProviderMixin<T extends InMemoryEntityConst
4646
readonly contextProviders: ContextProvider[];
4747
_json: AnyObject;
4848
prop<T_1 = undefined>(name: string, defaultValue: T_1): T_1;
49-
prop<T_2 = undefined>(name: string): T_2 | undefined;
49+
prop<T_1 = undefined>(name: string): T_1 | undefined;
5050
setProp(name: string, value: unknown): void;
5151
unsetProp(name: string): void;
52-
setProps(json?: AnyObject): any;
52+
setProps(json?: AnyObject): /*elided*/ any;
5353
toJSON(exclude?: string[]): AnyObject;
5454
toJSONSafe(exclude?: string[]): AnyObject;
5555
toJSONQuick(exclude?: string[]): AnyObject;
56-
clone(extraContext?: object | undefined): any;
56+
clone(extraContext?: object): /*elided*/ any;
5757
validate(): void;
5858
clean(config: AnyObject): AnyObject;
5959
isValid(): boolean;
@@ -79,14 +79,14 @@ export declare function ImportantSettingsProviderMixin<T extends InMemoryEntityC
7979
readonly contextProviders: ContextProvider[];
8080
_json: AnyObject;
8181
prop<T_1 = undefined>(name: string, defaultValue: T_1): T_1;
82-
prop<T_2 = undefined>(name: string): T_2 | undefined;
82+
prop<T_1 = undefined>(name: string): T_1 | undefined;
8383
setProp(name: string, value: unknown): void;
8484
unsetProp(name: string): void;
85-
setProps(json?: AnyObject): any;
85+
setProps(json?: AnyObject): /*elided*/ any;
8686
toJSON(exclude?: string[]): AnyObject;
8787
toJSONSafe(exclude?: string[]): AnyObject;
8888
toJSONQuick(exclude?: string[]): AnyObject;
89-
clone(extraContext?: object | undefined): any;
89+
clone(extraContext?: object): /*elided*/ any;
9090
validate(): void;
9191
clean(config: AnyObject): AnyObject;
9292
isValid(): boolean;

dist/js/entity/mixins/context.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
3-
exports.ImportantSettingsProviderMixin = exports.DomainContextProviderMixin = exports.ContextAndRenderFieldsMixin = void 0;
3+
exports.ContextAndRenderFieldsMixin = ContextAndRenderFieldsMixin;
4+
exports.DomainContextProviderMixin = DomainContextProviderMixin;
5+
exports.ImportantSettingsProviderMixin = ImportantSettingsProviderMixin;
46
const clone_1 = require("../../utils/clone");
57
function ContextAndRenderFieldsMixin(superclass) {
68
return class extends superclass {
@@ -44,7 +46,6 @@ function ContextAndRenderFieldsMixin(superclass) {
4446
}
4547
};
4648
}
47-
exports.ContextAndRenderFieldsMixin = ContextAndRenderFieldsMixin;
4849
/*
4950
* @summary Handles logic for domain-specific context, eg. "important settings".
5051
* Important settings are stored inside "important" property and have context providers associated with it.
@@ -62,7 +63,6 @@ function DomainContextProviderMixin(superclass) {
6263
}
6364
};
6465
}
65-
exports.DomainContextProviderMixin = DomainContextProviderMixin;
6666
function ImportantSettingsProviderMixin(superclass) {
6767
return class extends DomainContextProviderMixin(superclass) {
6868
get important() {
@@ -82,4 +82,3 @@ function ImportantSettingsProviderMixin(superclass) {
8282
}
8383
};
8484
}
85-
exports.ImportantSettingsProviderMixin = ImportantSettingsProviderMixin;

dist/js/entity/mixins/context_runtime.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ type RuntimeContext = Required<JobBaseSchema>["runtimeContext"];
44
export declare function RuntimeContextFieldMixin<T extends InMemoryEntityConstructor>(superclass: T): {
55
new (...args: any[]): {
66
_runtimeContext: RuntimeContext;
7-
runtimeContext: {};
7+
runtimeContext: RuntimeContext;
88
updateRuntimeContext(ctx?: RuntimeContext): void;
99
toJSON(exclude?: string[]): {
1010
runtimeContext: {};
1111
};
1212
_json: import("@mat3ra/esse/dist/js/esse/types").AnyObject;
1313
prop<T_1 = undefined>(name: string, defaultValue: T_1): T_1;
14-
prop<T_2 = undefined>(name: string): T_2 | undefined;
14+
prop<T_1 = undefined>(name: string): T_1 | undefined;
1515
setProp(name: string, value: unknown): void;
1616
unsetProp(name: string): void;
17-
setProps(json?: import("@mat3ra/esse/dist/js/esse/types").AnyObject): any;
17+
setProps(json?: import("@mat3ra/esse/dist/js/esse/types").AnyObject): /*elided*/ any;
1818
toJSONSafe(exclude?: string[]): import("@mat3ra/esse/dist/js/esse/types").AnyObject;
1919
toJSONQuick(exclude?: string[]): import("@mat3ra/esse/dist/js/esse/types").AnyObject;
20-
clone(extraContext?: object | undefined): any;
20+
clone(extraContext?: object): /*elided*/ any;
2121
validate(): void;
2222
clean(config: import("@mat3ra/esse/dist/js/esse/types").AnyObject): import("@mat3ra/esse/dist/js/esse/types").AnyObject;
2323
isValid(): boolean;

dist/js/entity/mixins/context_runtime.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
3-
exports.RuntimeContextFieldMixin = void 0;
3+
exports.RuntimeContextFieldMixin = RuntimeContextFieldMixin;
44
function RuntimeContextFieldMixin(superclass) {
55
return class extends superclass {
66
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -24,4 +24,3 @@ function RuntimeContextFieldMixin(superclass) {
2424
}
2525
};
2626
}
27-
exports.RuntimeContextFieldMixin = RuntimeContextFieldMixin;

0 commit comments

Comments
 (0)