Skip to content

SOF-7308-1: transpile and test #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: chore/SOF-7308
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ __pycache__/
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
Expand Down Expand Up @@ -173,3 +172,5 @@ node_modules/

########### GENERAL #############
*.DS_Store

tsconfig.tsbuildinfo
2 changes: 1 addition & 1 deletion dist/entity/mixins/context.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export declare function ContextAndRenderFieldsMixin<T extends InMemoryEntityCons
getCombinedContext(): {
[x: string]: unknown;
};
render(context?: AnyObject): void;
render(_context?: AnyObject): void;
_json: AnyObject;
prop<T_1 = undefined>(name: string, defaultValue: T_1): T_1;
prop<T_2 = undefined>(name: string): T_2 | undefined;
Expand Down
4 changes: 2 additions & 2 deletions dist/entity/mixins/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ function ContextAndRenderFieldsMixin(superclass) {
return { ...this.getPersistentContext(), ...this.context };
}
// override in subclasses
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
render(context = this.context) {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
render(_context = this.context) {
throw new Error("RenderInitMixin: render not implemented in derived class");
}
};
Expand Down
4 changes: 1 addition & 3 deletions dist/entity/mixins/runtime_items.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,9 @@ export declare function RuntimeItemsUILogicMixin<T extends InMemoryEntityConstru
setRuntimeItemsToDefaultValues(): void;
/**
* @summary Must pass config for subclasses to override and use initialization logic
* @param keys
* @param config
* @private
*/
_initRuntimeItems(keys: ItemKey[], config: object): void;
_initRuntimeItems(keys: ItemKey[], _config: object): void;
_addRuntimeItem(key: ItemKey | undefined, config: RuntimeItemSchema): void;
_removeRuntimeItem(key: ItemKey | undefined, config: RuntimeItemSchema): void;
_removeRuntimeItemByName(key: ItemKey, name: string): void;
Expand Down
6 changes: 2 additions & 4 deletions dist/entity/mixins/runtime_items.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,10 @@ function RuntimeItemsUILogicMixin(superclass) {
}
/**
* @summary Must pass config for subclasses to override and use initialization logic
* @param keys
* @param config
* @private
*/
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
_initRuntimeItems(keys, config) {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
_initRuntimeItems(keys, _config) {
// keeping this separate from constructor so that it can be overridden in mixing (eg. in `ExecutionUnit`)
// eslint-disable-next-line @typescript-eslint/no-this-alias
const me = this;
Expand Down
6 changes: 3 additions & 3 deletions dist/entity/other.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ export declare const NamedDefaultableRepetitionContextAndRenderInMemoryEntity: {
getCombinedContext(): {
[x: string]: unknown;
};
render(context?: import("./in_memory").AnyObject): void;
render(_context?: import("./in_memory").AnyObject): void;
_json: import("./in_memory").AnyObject;
prop<T = undefined>(name: string, defaultValue: T): T;
prop<T_1 = undefined>(name: string): T_1 | undefined;
Expand Down Expand Up @@ -527,7 +527,7 @@ export declare const NamedDefaultableRepetitionRuntimeItemsImportantSettingsCont
getCombinedContext(): {
[x: string]: unknown;
};
render(context?: import("./in_memory").AnyObject): void;
render(_context?: import("./in_memory").AnyObject): void;
_json: import("./in_memory").AnyObject;
prop<T = undefined>(name: string, defaultValue: T): T;
prop<T_1 = undefined>(name: string): T_1 | undefined;
Expand Down Expand Up @@ -606,7 +606,7 @@ export declare const NamedDefaultableRepetitionRuntimeItemsImportantSettingsCont
_json: import("./mixins/runtime_items").RuntimeItemsUILogicJSON;
getDefaultsByKey(key: import("./mixins/runtime_items").ItemKey): import("@mat3ra/esse/lib/js/types").NameResultSchema[];
setRuntimeItemsToDefaultValues(): void;
_initRuntimeItems(keys: import("./mixins/runtime_items").ItemKey[], config: object): void;
_initRuntimeItems(keys: import("./mixins/runtime_items").ItemKey[], _config: object): void;
_addRuntimeItem(key: import("./mixins/runtime_items").ItemKey | undefined, config: import("@mat3ra/esse/lib/js/types").RuntimeItemSchema): void;
_removeRuntimeItem(key: import("./mixins/runtime_items").ItemKey | undefined, config: import("@mat3ra/esse/lib/js/types").RuntimeItemSchema): void;
_removeRuntimeItemByName(key: import("./mixins/runtime_items").ItemKey, name: string): void;
Expand Down
1 change: 0 additions & 1 deletion dist/esse/types.d.ts

This file was deleted.

30 changes: 0 additions & 30 deletions dist/esse/types.js

This file was deleted.

2 changes: 1 addition & 1 deletion dist/utils/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ exports.getOneMatchFromObject = getOneMatchFromObject;
*/
function convertKeysToCamelCaseForObject(obj) {
const newObj = (0, clone_1.deepClone)(obj);
return (0, mapKeys_1.default)(newObj, (v, k) => (0, camelCase_1.default)(k));
return (0, mapKeys_1.default)(newObj, (_v, k) => (0, camelCase_1.default)(k));
}
exports.convertKeysToCamelCaseForObject = convertKeysToCamelCaseForObject;
function renameKeysForObject(
Expand Down
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions src/js/entity/mixins/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ export function ContextAndRenderFieldsMixin<T extends InMemoryEntityConstructor>
}

// override in subclasses
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
// @ts-ignore
render(context = this.context) {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
render(_context = this.context) {
throw new Error("RenderInitMixin: render not implemented in derived class");
}
};
Expand Down
7 changes: 2 additions & 5 deletions src/js/entity/mixins/runtime_items.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,10 @@ export function RuntimeItemsUILogicMixin<T extends InMemoryEntityConstructor>(su

/**
* @summary Must pass config for subclasses to override and use initialization logic
* @param keys
* @param config
* @private
*/
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
// @ts-ignore
_initRuntimeItems(keys: ItemKey[], config: object) {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
_initRuntimeItems(keys: ItemKey[], _config: object) {
// keeping this separate from constructor so that it can be overridden in mixing (eg. in `ExecutionUnit`)
// eslint-disable-next-line @typescript-eslint/no-this-alias
const me = this;
Expand Down
1 change: 0 additions & 1 deletion tests/js/context.tests.d.ts

This file was deleted.

81 changes: 0 additions & 81 deletions tests/js/context.tests.js

This file was deleted.

9 changes: 0 additions & 9 deletions tests/js/enums.d.ts

This file was deleted.

Loading
Loading