@fincity/kirun-js 1.4.3 → 1.4.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fincity/kirun-js",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "Javascript Runtime for Kinetic Instructions",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -12,10 +12,10 @@ export class TypeUtil {
12
12
 
13
13
  public static from(types: any): Type | undefined {
14
14
  if (typeof types === 'string') {
15
- return new SingleType(types as SchemaType);
15
+ return new SingleType(SchemaType[types as keyof typeof SchemaType]);
16
16
  } else if (Array.isArray(types)) {
17
17
  return new MultipleType(
18
- new Set(types.map((e) => e as any).map((e) => e as SchemaType)),
18
+ new Set(types.map((e) => e as keyof typeof SchemaType).map((e) => SchemaType[e])),
19
19
  );
20
20
  }
21
21
  return undefined;