xml-model 1.3.0 → 1.3.2

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.
Files changed (71) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +4 -10
  2. package/dist/defaults.js +9 -8
  3. package/dist/errors.js +14 -20
  4. package/dist/index.js +2 -42
  5. package/dist/middleware.js +4 -10
  6. package/dist/model/built-ins.js +0 -3
  7. package/dist/model/index.js +31 -40
  8. package/dist/model/property.js +10 -15
  9. package/dist/model/registry.js +2 -9
  10. package/dist/node_modules/reflect-metadata/Reflect.js +9 -70
  11. package/dist/util/is-regexp.js +0 -3
  12. package/dist/util/kebab-case.js +0 -3
  13. package/dist/util/merge-maps.js +1 -5
  14. package/dist/vite/index.d.ts +53 -0
  15. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/common/format.js +2 -0
  16. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/common/index.js +2 -0
  17. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/api-call-transformer.js +2 -0
  18. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/common/class-analyzer.js +2 -0
  19. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/common/compile-error.js +2 -0
  20. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/common/import-analyzer.js +2 -0
  21. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/common/interface-analyzer.js +2 -0
  22. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/common/visitor-base.js +2 -0
  23. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/declarations-emitter.js +2 -0
  24. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/encode-parameter.js +2 -0
  25. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/find-relative-path.js +2 -0
  26. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/flags.js +2 -0
  27. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/forward-ref.js +2 -0
  28. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/get-exports-for-symbol.js +2 -0
  29. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/index.js +2 -0
  30. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/legacy-decorator.js +2 -0
  31. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/legacy-type-encoder.js +2 -0
  32. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/literal-node.js +2 -0
  33. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/metadata-collector.js +2 -0
  34. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/metadata-decorator.js +2 -0
  35. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/metadata-emitter.js +2 -0
  36. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/metadata-encoder.js +2 -0
  37. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/rt-helper.js +2 -0
  38. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/rtti-visitor-base.js +2 -0
  39. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/serialize.js +2 -0
  40. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/type-encoder.js +2 -0
  41. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/type-literal.js +3 -1
  42. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/utils.js +4 -2
  43. package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/workarounds.js +2 -0
  44. package/dist/xml/index.js +8 -24
  45. package/package.json +13 -11
  46. package/dist/model/types.js +0 -2
  47. package/dist/node_modules/typescript-rtti/dist.esm/common/format.js +0 -106
  48. package/dist/node_modules/typescript-rtti/dist.esm/index.js +0 -2
  49. package/dist/node_modules/typescript-rtti/dist.esm/lib/get-parameter-names.js +0 -15
  50. package/dist/node_modules/typescript-rtti/dist.esm/lib/index.js +0 -43
  51. package/dist/node_modules/typescript-rtti/dist.esm/lib/reflect.js +0 -2225
  52. package/dist/node_modules/typescript-rtti/dist.esm/lib/sealed.js +0 -13
  53. package/dist/types.js +0 -2
  54. package/vite/dist/src/class-names.test.d.ts +0 -9
  55. package/vite/dist/src/defaults.d.ts +0 -15
  56. package/vite/dist/src/errors.d.ts +0 -24
  57. package/vite/dist/src/index.d.ts +0 -8
  58. package/vite/dist/src/middleware.d.ts +0 -10
  59. package/vite/dist/src/model/built-ins.d.ts +0 -3
  60. package/vite/dist/src/model/index.d.ts +0 -21
  61. package/vite/dist/src/model/property.d.ts +0 -6
  62. package/vite/dist/src/model/registry.d.ts +0 -9
  63. package/vite/dist/src/model/types.d.ts +0 -74
  64. package/vite/dist/src/model.test.d.ts +0 -2
  65. package/vite/dist/src/types.d.ts +0 -17
  66. package/vite/dist/src/util/is-regexp.d.ts +0 -12
  67. package/vite/dist/src/util/kebab-case.d.ts +0 -16
  68. package/vite/dist/src/util/merge-maps.d.ts +0 -2
  69. package/vite/dist/src/xml/index.d.ts +0 -33
  70. package/vite/dist/src/xml/xml-js.d.ts +0 -7
  71. /package/{vite/dist → dist/vite}/index.js +0 -0
@@ -1,4 +1,6 @@
1
1
  import { externalModules, getDirectoryPath, getDefaultLikeExportInfo, skipAlias, isTypeOnlySymbol, hasFilesystemAccess, fileExists } from "./utils.js";
2
+ import { createRequire } from "node:module";
3
+ const require$1 = createRequire(import.meta.url);
2
4
  function getExportsForSymbol(program, importingFile, symbol) {
3
5
  const checker = program.getTypeChecker();
4
6
  const compilerOptions = program.getCompilerOptions();
@@ -5,6 +5,8 @@ import { CompileError } from "./common/compile-error.js";
5
5
  import { ApiCallTransformer } from "./api-call-transformer.js";
6
6
  import { MetadataEmitter } from "./metadata-emitter.js";
7
7
  import { DeclarationsEmitter } from "./declarations-emitter.js";
8
+ import { createRequire } from "node:module";
9
+ const require$1 = createRequire(import.meta.url);
8
10
  const transformer = (program) => {
9
11
  let compilerOptions = program.getCompilerOptions();
10
12
  if (typeof compilerOptions["rtti$emitStandardMetadata"] === "undefined") {
@@ -1,3 +1,5 @@
1
+ import { createRequire } from "node:module";
2
+ const require$1 = createRequire(import.meta.url);
1
3
  function legacyDecorator(decorator) {
2
4
  decorator["__Φlegacy"] = true;
3
5
  return decorator;
@@ -1,6 +1,8 @@
1
1
  import ts from "typescript";
2
2
  import { typeLiteral } from "./type-literal.js";
3
3
  import { hasFlag, hasAnyFlag, isFlagType } from "./utils.js";
4
+ import { createRequire } from "node:module";
5
+ const require$1 = createRequire(import.meta.url);
4
6
  class LegacyTypeEncoder {
5
7
  constructor(ctx) {
6
8
  this.ctx = ctx;
@@ -1,3 +1,5 @@
1
+ import { createRequire } from "node:module";
2
+ const require$1 = createRequire(import.meta.url);
1
3
  function literalNode(expr) {
2
4
  return { $__isTSNode: true, node: expr };
3
5
  }
@@ -1,5 +1,7 @@
1
1
  import ts from "typescript";
2
2
  import { getDecorators, getModifiers } from "./utils.js";
3
+ import { createRequire } from "node:module";
4
+ const require$1 = createRequire(import.meta.url);
3
5
  class InlineMetadataCollector {
4
6
  collect(node, decorators) {
5
7
  if (decorators.length === 0)
@@ -3,6 +3,8 @@ import { legacyDecorator } from "./legacy-decorator.js";
3
3
  import { literalNode } from "./literal-node.js";
4
4
  import { serialize } from "./serialize.js";
5
5
  import { hasModifier, getModifiers, expressionForPropertyName } from "./utils.js";
6
+ import { createRequire } from "node:module";
7
+ const require$1 = createRequire(import.meta.url);
6
8
  function metadataDecorator(key, object) {
7
9
  return ts.factory.createDecorator(ts.factory.createCallExpression(ts.factory.createPropertyAccessExpression(ts.factory.createIdentifier("__RΦ"), "m"), [], [
8
10
  ts.factory.createStringLiteral(key),
@@ -11,6 +11,7 @@ import { serialize } from "./serialize.js";
11
11
  import { literalNode } from "./literal-node.js";
12
12
  import "../common/index.js";
13
13
  import { WORKAROUND_TYPESCRIPT_49794 } from "./workarounds.js";
14
+ import { createRequire } from "node:module";
14
15
  import { T_ENUM } from "../common/format.js";
15
16
  var __decorate = function(decorators, target, key, desc) {
16
17
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -21,6 +22,7 @@ var __decorate = function(decorators, target, key, desc) {
21
22
  var __metadata = function(k, v) {
22
23
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
23
24
  };
25
+ const require$1 = createRequire(import.meta.url);
24
26
  class MetadataEmitter extends RttiVisitor {
25
27
  constructor() {
26
28
  super(...arguments);
@@ -9,6 +9,8 @@ import { metadataDecorator, legacyMetadataDecorator } from "./metadata-decorator
9
9
  import { serialize } from "./serialize.js";
10
10
  import { TypeEncoder } from "./type-encoder.js";
11
11
  import { expressionForPropertyName, hasModifier, getModifiers, propertyNameToString } from "./utils.js";
12
+ import { createRequire } from "node:module";
13
+ const require$1 = createRequire(import.meta.url);
12
14
  class MetadataEncoder {
13
15
  constructor(ctx) {
14
16
  this.ctx = ctx;
@@ -1,6 +1,8 @@
1
1
  import ts from "typescript";
2
2
  import { literalNode } from "./literal-node.js";
3
3
  import { serialize } from "./serialize.js";
4
+ import { createRequire } from "node:module";
5
+ const require$1 = createRequire(import.meta.url);
4
6
  function rtStore(typeMap) {
5
7
  const factory = ts.factory;
6
8
  let typeEntries = Array.from(typeMap.entries()).map(([i, t]) => factory.createPropertyAssignment(factory.createComputedPropertyName(ts.factory.createNumericLiteral(i)), t));
@@ -1,4 +1,6 @@
1
1
  import { VisitorBase } from "./common/visitor-base.js";
2
+ import { createRequire } from "node:module";
3
+ const require$1 = createRequire(import.meta.url);
2
4
  class RttiVisitor extends VisitorBase {
3
5
  constructor(ctx) {
4
6
  super(ctx.transformationContext);
@@ -1,6 +1,8 @@
1
1
  import ts from "typescript";
2
2
  import "../common/index.js";
3
+ import { createRequire } from "node:module";
3
4
  import { isLiteralNode } from "../common/format.js";
5
+ const require$1 = createRequire(import.meta.url);
4
6
  function serialize(object) {
5
7
  if (object === null)
6
8
  return ts.factory.createNull();
@@ -4,6 +4,8 @@ import { literalNode } from "./literal-node.js";
4
4
  import { serialize } from "./serialize.js";
5
5
  import { structuredTypeLiteral, typeLiteral } from "./type-literal.js";
6
6
  import { hasFlag } from "./utils.js";
7
+ import { createRequire } from "node:module";
8
+ const require$1 = createRequire(import.meta.url);
7
9
  class TypeEncoder {
8
10
  constructor(ctx) {
9
11
  this.ctx = ctx;
@@ -7,7 +7,9 @@ import { serialize } from "./serialize.js";
7
7
  import { hasFlag, isFlagType, typeHasValue, getTypeLocality, serializeEntityNameAsExpression, isInterfaceType, propertyPrepend, optionalExportRef, isNodeJS, hasFilesystemAccess, fileExists } from "./utils.js";
8
8
  import { forwardRef } from "./forward-ref.js";
9
9
  import { encodeParameter } from "./encode-parameter.js";
10
+ import { createRequire } from "node:module";
10
11
  import { T_VOID, T_ENUM, T_UNION, T_INTERSECTION, T_NULL, T_UNDEFINED, T_UNKNOWN, T_ANY, T_TRUE, T_FALSE, T_THIS, T_MAPPED, T_TUPLE, T_ARRAY, T_GENERIC, T_FUNCTION, T_OBJECT, F_OPTIONAL, T_STAND_IN } from "../common/format.js";
12
+ const require$1 = createRequire(import.meta.url);
11
13
  function typeLiteral(encoder, type, typeNode, options) {
12
14
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
13
15
  let ctx = encoder.ctx;
@@ -423,7 +425,7 @@ function inferImportPath(ctx, type, symbol) {
423
425
  let requireX = function(path2) {
424
426
  return requireN(path2);
425
427
  };
426
- let requireN = require;
428
+ let requireN = require$1;
427
429
  const fs = requireX("fs");
428
430
  const path = requireX("path");
429
431
  let pkgJsonPath = path.resolve(path.dirname(ctx.sourceFile.fileName), pathToNodeModules, packageName, "package.json");
@@ -1,4 +1,6 @@
1
1
  import ts from "typescript";
2
+ import { createRequire } from "node:module";
3
+ const require$1 = createRequire(import.meta.url);
2
4
  function assert(check) {
3
5
  if (!check())
4
6
  throw new Error(`Assertion failed: ${check.toString().replace(/.*?=> */, "")}`);
@@ -792,7 +794,7 @@ function hasFilesystemAccess() {
792
794
  if (isNodeJS()) {
793
795
  let fsx;
794
796
  try {
795
- fsx = require("fs");
797
+ fsx = require$1("fs");
796
798
  } catch (e) {
797
799
  }
798
800
  return !!fsx;
@@ -803,7 +805,7 @@ function fileExists(filename) {
803
805
  if (isNodeJS()) {
804
806
  let fsx;
805
807
  try {
806
- fsx = require("fs");
808
+ fsx = require$1("fs");
807
809
  } catch (e) {
808
810
  }
809
811
  if (fsx)
@@ -1,3 +1,5 @@
1
+ import { createRequire } from "node:module";
2
+ const require$1 = createRequire(import.meta.url);
1
3
  const WORKAROUND_TYPESCRIPT_49794 = true;
2
4
  export {
3
5
  WORKAROUND_TYPESCRIPT_49794
package/dist/xml/index.js CHANGED
@@ -1,56 +1,40 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
1
  import XMLJS from "./xml-js.js";
4
2
  function parse(string) {
5
3
  return XMLJS.parse(string);
6
4
  }
7
- __name(parse, "parse");
8
5
  const stringify = XMLJS.stringify;
9
6
  function getContent(xml) {
10
7
  if (xml.elements?.length === 1) {
11
8
  const content = xml.elements[0];
12
- if (content.type === "text")
13
- return content.text;
9
+ if (content.type === "text") return content.text;
14
10
  }
15
- if (!xml.elements)
16
- return "";
11
+ if (!xml.elements) return "";
17
12
  throw new TypeError(`can't get text from XMLElement: ${JSON.stringify(xml)}`);
18
13
  }
19
- __name(getContent, "getContent");
20
14
  function fromContent(content = "", tag, attributes) {
21
15
  const el = {
22
16
  elements: content ? [{ type: "text", text: String(content) }] : []
23
17
  };
24
- if (tag)
25
- el.name = tag;
18
+ if (tag) el.name = tag;
26
19
  if (attributes) {
27
- if (!el.name)
28
- throw new TypeError("please provide a name if you want to provide attributes");
20
+ if (!el.name) throw new TypeError("please provide a name if you want to provide attributes");
29
21
  el.attributes = attributes;
30
22
  }
31
- if (el.name)
32
- el.type = "element";
23
+ if (el.name) el.type = "element";
33
24
  return el;
34
25
  }
35
- __name(fromContent, "fromContent");
36
26
  function addElement(xml, element) {
37
- if (!xml.elements)
38
- xml.elements = [];
27
+ if (!xml.elements) xml.elements = [];
39
28
  xml.elements.push(element);
40
29
  }
41
- __name(addElement, "addElement");
42
30
  function setAttribute(xml, attribute, value) {
43
- if (!xml.attributes)
44
- xml.attributes = {};
31
+ if (!xml.attributes) xml.attributes = {};
45
32
  xml.attributes[attribute] = value;
46
33
  }
47
- __name(setAttribute, "setAttribute");
48
34
  function deleteAttribute(xml, attribute) {
49
- if (!xml.attributes)
50
- return;
35
+ if (!xml.attributes) return;
51
36
  delete xml.attributes[attribute];
52
37
  }
53
- __name(deleteAttribute, "deleteAttribute");
54
38
  const XML = {
55
39
  parse,
56
40
  stringify,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xml-model",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "allows transparent XML <-> Object conversion in typescript",
5
5
  "license": "MIT",
6
6
  "author": "MathisTLD",
@@ -11,17 +11,17 @@
11
11
  "types": "./dist/index.d.ts",
12
12
  "import": "./dist/index.js"
13
13
  },
14
+ "./vite": {
15
+ "types": "./dist/vite/index.d.ts",
16
+ "import": "./dist/vite/index.js"
17
+ },
14
18
  "./*": {
15
19
  "types": "./dist/*.d.ts",
16
20
  "import": "./dist/*.js"
17
- },
18
- "./vite": {
19
- "types": "./vite/dist/index.d.ts",
20
- "import": "./vite/dist/index.js"
21
21
  }
22
22
  },
23
23
  "scripts": {
24
- "preversion": "npm test -- --run",
24
+ "preversion": "vitest run",
25
25
  "version": "npm run build",
26
26
  "postversion": "git push && git push --tags",
27
27
  "build": "vite build",
@@ -34,6 +34,7 @@
34
34
  "prepare": "husky"
35
35
  },
36
36
  "dependencies": {
37
+ "typescript-rtti": "0.9.6",
37
38
  "xml-js": "^1.6.11"
38
39
  },
39
40
  "devDependencies": {
@@ -41,18 +42,19 @@
41
42
  "@types/node": "^24.10.11",
42
43
  "husky": "^9.1.7",
43
44
  "lint-staged": "^16.2.7",
44
- "marmotte": "^0.1.4",
45
- "oxfmt": "^0.28.0",
46
- "oxlint": "^1.43.0",
45
+ "marmotte": "^0.4.2",
46
+ "oxfmt": "^0.36.0",
47
+ "oxlint": "^1.51.0",
47
48
  "reflect-metadata": "^0.1.14",
48
49
  "typescript": "*",
49
- "typescript-rtti": "^0.9.6",
50
50
  "vite": "*",
51
+ "vitepress": "^2.0.0-alpha.16",
51
52
  "vitest": "^4.0.18"
52
53
  },
53
54
  "peerDependencies": {
54
55
  "@rollup/plugin-typescript": "^12.3.0",
55
- "typescript": "^5.1.0",
56
+ "tslib": "^2.8.1",
57
+ "typescript": "~5.1.6",
56
58
  "vite": "^7.3.1"
57
59
  },
58
60
  "peerDependenciesMeta": {
@@ -1,2 +0,0 @@
1
-
2
- //# sourceMappingURL=types.js.map
@@ -1,106 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- const F_READONLY = "R";
4
- const F_ABSTRACT = "A";
5
- const F_PUBLIC = "$";
6
- const F_PRIVATE = "#";
7
- const F_PROTECTED = "@";
8
- const F_PROPERTY = "P";
9
- const F_METHOD = "M";
10
- const F_STATIC = "S";
11
- const F_CLASS = "C";
12
- const F_INTERFACE = "I";
13
- const F_FUNCTION = "F";
14
- const F_ARROW_FUNCTION = ">";
15
- const F_OPTIONAL = "?";
16
- const F_REST = "3";
17
- const F_ASYNC = "a";
18
- const F_EXPORTED = "e";
19
- const F_INFERRED = ".";
20
- const F_OMITTED = ",";
21
- const F_ARRAY_BINDING = "[";
22
- const F_OBJECT_BINDING = "O";
23
- const T_UNION = "|";
24
- const T_INTERSECTION = "&";
25
- const T_ANY = "~";
26
- const T_UNKNOWN = "U";
27
- const T_VOID = "V";
28
- const T_UNDEFINED = "u";
29
- const T_NULL = "n";
30
- const T_TUPLE = "T";
31
- const T_ARRAY = "[";
32
- const T_THIS = "t";
33
- const T_GENERIC = "g";
34
- const T_MAPPED = "m";
35
- const T_TRUE = "1";
36
- const T_FALSE = "0";
37
- const T_CALLSITE = "c";
38
- const T_STAND_IN = "5";
39
- const T_OBJECT = "O";
40
- const T_ENUM = "e";
41
- const T_FUNCTION = "F";
42
- const T_INTRINSICS = [T_VOID, T_ANY, T_UNKNOWN, T_UNDEFINED, T_TRUE, T_FALSE, T_THIS, T_NULL];
43
- const TI_VOID = { TΦ: T_VOID };
44
- const TI_ANY = { TΦ: T_ANY };
45
- const TI_UNKNOWN = { TΦ: T_UNKNOWN };
46
- const TI_UNDEFINED = { TΦ: T_UNDEFINED };
47
- const TI_TRUE = { TΦ: T_TRUE };
48
- const TI_FALSE = { TΦ: T_FALSE };
49
- const TI_THIS = { TΦ: T_THIS };
50
- const TI_NULL = { TΦ: T_NULL };
51
- function isLiteralNode(node) {
52
- return !!node["$__isTSNode"];
53
- }
54
- __name(isLiteralNode, "isLiteralNode");
55
- export {
56
- F_ABSTRACT,
57
- F_ARRAY_BINDING,
58
- F_ARROW_FUNCTION,
59
- F_ASYNC,
60
- F_CLASS,
61
- F_EXPORTED,
62
- F_FUNCTION,
63
- F_INFERRED,
64
- F_INTERFACE,
65
- F_METHOD,
66
- F_OBJECT_BINDING,
67
- F_OMITTED,
68
- F_OPTIONAL,
69
- F_PRIVATE,
70
- F_PROPERTY,
71
- F_PROTECTED,
72
- F_PUBLIC,
73
- F_READONLY,
74
- F_REST,
75
- F_STATIC,
76
- TI_ANY,
77
- TI_FALSE,
78
- TI_NULL,
79
- TI_THIS,
80
- TI_TRUE,
81
- TI_UNDEFINED,
82
- TI_UNKNOWN,
83
- TI_VOID,
84
- T_ANY,
85
- T_ARRAY,
86
- T_CALLSITE,
87
- T_ENUM,
88
- T_FALSE,
89
- T_FUNCTION,
90
- T_GENERIC,
91
- T_INTERSECTION,
92
- T_INTRINSICS,
93
- T_MAPPED,
94
- T_NULL,
95
- T_OBJECT,
96
- T_STAND_IN,
97
- T_THIS,
98
- T_TRUE,
99
- T_TUPLE,
100
- T_UNDEFINED,
101
- T_UNION,
102
- T_UNKNOWN,
103
- T_VOID,
104
- isLiteralNode
105
- };
106
- //# sourceMappingURL=format.js.map
@@ -1,2 +0,0 @@
1
- import "./lib/index.js";
2
- //# sourceMappingURL=index.js.map
@@ -1,15 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- const COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
4
- const DEFAULT_PARAMS = /=[^,]+/mg;
5
- const FAT_ARROWS = /=>.*$/mg;
6
- function getParameterNames(fn) {
7
- const code = fn.toString().replace(COMMENTS, "").replace(FAT_ARROWS, "").replace(DEFAULT_PARAMS, "");
8
- const result = code.slice(code.indexOf("(") + 1, code.indexOf(")")).match(/([^\s,]+)/g);
9
- return result === null ? [] : result;
10
- }
11
- __name(getParameterNames, "getParameterNames");
12
- export {
13
- getParameterNames
14
- };
15
- //# sourceMappingURL=get-parameter-names.js.map
@@ -1,43 +0,0 @@
1
- import { ReflectedAnyRef, ReflectedArrayRef, ReflectedCallSite, ReflectedClass, ReflectedClassRef, ReflectedConstructorParameter, ReflectedEnumRef, ReflectedFalseRef, ReflectedFlags, ReflectedFunction, ReflectedFunctionParameter, ReflectedFunctionRef, ReflectedGenericRef, ReflectedInterfaceRef, ReflectedIntersectionRef, ReflectedLiteralRef, ReflectedMappedRef, ReflectedMember, ReflectedMethod, ReflectedMethodParameter, ReflectedNullRef, ReflectedObjectMember, ReflectedObjectRef, ReflectedParameter, ReflectedProperty, ReflectedTrueRef, ReflectedTupleElement, ReflectedTupleRef, ReflectedTypeRef, ReflectedUndefinedRef, ReflectedUnionRef, ReflectedUnknownRef, ReflectedVoidRef, TYPE_REF_KIND_EXPANSION, implementsInterface, isCallSite, matchesShape, reflect, reify } from "./reflect.js";
2
- export {
3
- ReflectedAnyRef,
4
- ReflectedArrayRef,
5
- ReflectedCallSite,
6
- ReflectedClass,
7
- ReflectedClassRef,
8
- ReflectedConstructorParameter,
9
- ReflectedEnumRef,
10
- ReflectedFalseRef,
11
- ReflectedFlags,
12
- ReflectedFunction,
13
- ReflectedFunctionParameter,
14
- ReflectedFunctionRef,
15
- ReflectedGenericRef,
16
- ReflectedInterfaceRef,
17
- ReflectedIntersectionRef,
18
- ReflectedLiteralRef,
19
- ReflectedMappedRef,
20
- ReflectedMember,
21
- ReflectedMethod,
22
- ReflectedMethodParameter,
23
- ReflectedNullRef,
24
- ReflectedObjectMember,
25
- ReflectedObjectRef,
26
- ReflectedParameter,
27
- ReflectedProperty,
28
- ReflectedTrueRef,
29
- ReflectedTupleElement,
30
- ReflectedTupleRef,
31
- ReflectedTypeRef,
32
- ReflectedUndefinedRef,
33
- ReflectedUnionRef,
34
- ReflectedUnknownRef,
35
- ReflectedVoidRef,
36
- TYPE_REF_KIND_EXPANSION,
37
- implementsInterface,
38
- isCallSite,
39
- matchesShape,
40
- reflect,
41
- reify
42
- };
43
- //# sourceMappingURL=index.js.map