@skmtc/core 0.0.358 → 0.0.359

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,8 +26,8 @@ export class Definition extends ValueBase {
26
26
  this.description = description;
27
27
  }
28
28
  toString() {
29
- const identifier = this.identifier.tsType
30
- ? `${this.identifier.name}: ${this.identifier.tsType}`
29
+ const identifier = this.identifier.typeName
30
+ ? `${this.identifier.name}: ${this.identifier.typeName}`
31
31
  : this.identifier.name;
32
32
  // @TODO move syntax to typescript package to enable language agnostic use
33
33
  return withDescription(`export ${this.identifier.entityType} ${identifier} = ${this.value};`, {
@@ -1,15 +1,15 @@
1
1
  import { EntityType } from './EntityType.js';
2
2
  type ConstructorArgs = {
3
3
  name: string;
4
- tsType?: string;
4
+ typeName?: string;
5
5
  entityType: EntityType;
6
6
  };
7
7
  export declare class Identifier {
8
8
  name: string;
9
9
  entityType: EntityType;
10
- tsType?: string;
11
- constructor({ name, tsType, entityType }: ConstructorArgs);
12
- static createVariable(name: string, tsType?: string): Identifier;
10
+ typeName?: string;
11
+ constructor({ name, typeName, entityType }: ConstructorArgs);
12
+ static createVariable(name: string, typeName?: string): Identifier;
13
13
  static createType(name: string): Identifier;
14
14
  toString(): string;
15
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Identifier.d.ts","sourceRoot":"","sources":["../../src/dsl/Identifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED,qBAAa,UAAU;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;gBAEH,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,eAAe;IAMzD,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU;IAehE,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU;IAO3C,QAAQ,IAAI,MAAM;CAGnB"}
1
+ {"version":3,"file":"Identifier.d.ts","sourceRoot":"","sources":["../../src/dsl/Identifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED,qBAAa,UAAU;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,UAAU,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;gBAEL,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,eAAe;IAM3D,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,UAAU;IAelE,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU;IAO3C,QAAQ,IAAI,MAAM;CAGnB"}
@@ -1,6 +1,6 @@
1
1
  import { EntityType } from './EntityType.js';
2
2
  export class Identifier {
3
- constructor({ name, tsType, entityType }) {
3
+ constructor({ name, typeName, entityType }) {
4
4
  Object.defineProperty(this, "name", {
5
5
  enumerable: true,
6
6
  configurable: true,
@@ -13,21 +13,21 @@ export class Identifier {
13
13
  writable: true,
14
14
  value: void 0
15
15
  });
16
- Object.defineProperty(this, "tsType", {
16
+ Object.defineProperty(this, "typeName", {
17
17
  enumerable: true,
18
18
  configurable: true,
19
19
  writable: true,
20
20
  value: void 0
21
21
  });
22
22
  this.name = name;
23
- this.tsType = tsType;
23
+ this.typeName = typeName;
24
24
  this.entityType = entityType;
25
25
  }
26
- static createVariable(name, tsType) {
27
- if (tsType) {
26
+ static createVariable(name, typeName) {
27
+ if (typeName) {
28
28
  return new Identifier({
29
29
  name,
30
- tsType,
30
+ typeName,
31
31
  entityType: new EntityType('variable')
32
32
  });
33
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skmtc/core",
3
- "version": "0.0.358",
3
+ "version": "0.0.359",
4
4
  "main": "./script/mod.js",
5
5
  "module": "./esm/mod.js",
6
6
  "exports": {
@@ -29,8 +29,8 @@ class Definition extends ValueBase_js_1.ValueBase {
29
29
  this.description = description;
30
30
  }
31
31
  toString() {
32
- const identifier = this.identifier.tsType
33
- ? `${this.identifier.name}: ${this.identifier.tsType}`
32
+ const identifier = this.identifier.typeName
33
+ ? `${this.identifier.name}: ${this.identifier.typeName}`
34
34
  : this.identifier.name;
35
35
  // @TODO move syntax to typescript package to enable language agnostic use
36
36
  return (0, withDescription_js_1.withDescription)(`export ${this.identifier.entityType} ${identifier} = ${this.value};`, {
@@ -1,15 +1,15 @@
1
1
  import { EntityType } from './EntityType.js';
2
2
  type ConstructorArgs = {
3
3
  name: string;
4
- tsType?: string;
4
+ typeName?: string;
5
5
  entityType: EntityType;
6
6
  };
7
7
  export declare class Identifier {
8
8
  name: string;
9
9
  entityType: EntityType;
10
- tsType?: string;
11
- constructor({ name, tsType, entityType }: ConstructorArgs);
12
- static createVariable(name: string, tsType?: string): Identifier;
10
+ typeName?: string;
11
+ constructor({ name, typeName, entityType }: ConstructorArgs);
12
+ static createVariable(name: string, typeName?: string): Identifier;
13
13
  static createType(name: string): Identifier;
14
14
  toString(): string;
15
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Identifier.d.ts","sourceRoot":"","sources":["../../src/dsl/Identifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED,qBAAa,UAAU;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;gBAEH,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,eAAe;IAMzD,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU;IAehE,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU;IAO3C,QAAQ,IAAI,MAAM;CAGnB"}
1
+ {"version":3,"file":"Identifier.d.ts","sourceRoot":"","sources":["../../src/dsl/Identifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAA;AAED,qBAAa,UAAU;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,UAAU,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;gBAEL,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,eAAe;IAM3D,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,UAAU;IAelE,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU;IAO3C,QAAQ,IAAI,MAAM;CAGnB"}
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Identifier = void 0;
4
4
  const EntityType_js_1 = require("./EntityType.js");
5
5
  class Identifier {
6
- constructor({ name, tsType, entityType }) {
6
+ constructor({ name, typeName, entityType }) {
7
7
  Object.defineProperty(this, "name", {
8
8
  enumerable: true,
9
9
  configurable: true,
@@ -16,21 +16,21 @@ class Identifier {
16
16
  writable: true,
17
17
  value: void 0
18
18
  });
19
- Object.defineProperty(this, "tsType", {
19
+ Object.defineProperty(this, "typeName", {
20
20
  enumerable: true,
21
21
  configurable: true,
22
22
  writable: true,
23
23
  value: void 0
24
24
  });
25
25
  this.name = name;
26
- this.tsType = tsType;
26
+ this.typeName = typeName;
27
27
  this.entityType = entityType;
28
28
  }
29
- static createVariable(name, tsType) {
30
- if (tsType) {
29
+ static createVariable(name, typeName) {
30
+ if (typeName) {
31
31
  return new Identifier({
32
32
  name,
33
- tsType,
33
+ typeName,
34
34
  entityType: new EntityType_js_1.EntityType('variable')
35
35
  });
36
36
  }