@player-tools/xlr 0.4.2-next.1 → 0.5.0-next.0

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.
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // ../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/xlr/types/src/index.ts
17
+ var src_exports = {};
18
+ module.exports = __toCommonJS(src_exports);
19
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/xlr/types/src/index.ts"],"sourcesContent":["export * from \"./core\";\nexport * from \"./utility\";\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.mjs.map
package/dist/index.mjs ADDED
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json CHANGED
@@ -1,31 +1,25 @@
1
1
  {
2
2
  "name": "@player-tools/xlr",
3
- "version": "0.4.2-next.1",
4
- "private": false,
5
- "publishConfig": {
6
- "registry": "https://registry.npmjs.org"
7
- },
8
- "peerDependencies": {},
9
- "dependencies": {
10
- "@babel/runtime": "7.15.4"
11
- },
12
- "main": "dist/index.cjs.js",
13
- "module": "dist/index.esm.js",
14
- "typings": "dist/index.d.ts",
3
+ "version": "0.5.0-next.0",
4
+ "main": "dist/cjs/index.cjs",
5
+ "module": "dist/index.legacy-esm.js",
6
+ "types": "types/index.d.ts",
15
7
  "sideEffects": false,
16
- "license": "MIT",
17
- "repository": {
18
- "type": "git",
19
- "url": "https://github.com/player-ui/tools"
8
+ "exports": {
9
+ "./package.json": "./package.json",
10
+ ".": {
11
+ "types": "./types/index.d.ts",
12
+ "import": "./dist/index.mjs",
13
+ "default": "./dist/cjs/index.cjs"
14
+ }
20
15
  },
21
- "bugs": {
22
- "url": "https://github.com/player-ui/tools/issues"
16
+ "files": [
17
+ "dist",
18
+ "src",
19
+ "types"
20
+ ],
21
+ "dependencies": {
22
+ "tslib": "^2.6.2"
23
23
  },
24
- "homepage": "https://player-ui.github.io",
25
- "contributors": [
26
- {
27
- "name": "Ketan Reddy",
28
- "url": "https://github.com/KetanReddy"
29
- }
30
- ]
24
+ "peerDependencies": {}
31
25
  }
package/src/core.ts CHANGED
@@ -32,28 +32,28 @@ export interface TypeNode<Name = string> {
32
32
  type: Name;
33
33
  }
34
34
 
35
- export type AnyType = TypeNode<'any'> & CommonTypeInfo<any> & Annotations;
35
+ export type AnyType = TypeNode<"any"> & CommonTypeInfo<any> & Annotations;
36
36
 
37
- export type UnknownType = TypeNode<'unknown'> &
37
+ export type UnknownType = TypeNode<"unknown"> &
38
38
  CommonTypeInfo<unknown> &
39
39
  Annotations;
40
- export type UndefinedType = TypeNode<'undefined'> &
40
+ export type UndefinedType = TypeNode<"undefined"> &
41
41
  CommonTypeInfo<undefined> &
42
42
  Annotations;
43
- export type NullType = TypeNode<'null'> & CommonTypeInfo<null> & Annotations;
44
- export type VoidType = TypeNode<'void'> & CommonTypeInfo<void> & Annotations;
45
- export type StringType = TypeNode<'string'> &
43
+ export type NullType = TypeNode<"null"> & CommonTypeInfo<null> & Annotations;
44
+ export type VoidType = TypeNode<"void"> & CommonTypeInfo<void> & Annotations;
45
+ export type StringType = TypeNode<"string"> &
46
46
  CommonTypeInfo<string> &
47
47
  Annotations;
48
- export type NumberType = TypeNode<'number'> &
48
+ export type NumberType = TypeNode<"number"> &
49
49
  CommonTypeInfo<number> &
50
50
  Annotations;
51
- export type BooleanType = TypeNode<'boolean'> &
51
+ export type BooleanType = TypeNode<"boolean"> &
52
52
  CommonTypeInfo<boolean> &
53
53
  Annotations;
54
- export type NeverType = TypeNode<'never'> & CommonTypeInfo<never> & Annotations;
54
+ export type NeverType = TypeNode<"never"> & CommonTypeInfo<never> & Annotations;
55
55
 
56
- export interface RefNode extends TypeNode<'ref'> {
56
+ export interface RefNode extends TypeNode<"ref"> {
57
57
  /** Name of the referenced Type */
58
58
  ref: string;
59
59
  /** Parameters to potentially fill in a generic when it is resolved. Position is preserved */
@@ -69,7 +69,7 @@ export interface ObjectProperty {
69
69
  /** The type of the property */
70
70
  node: NodeType;
71
71
  }
72
- export interface ObjectNode extends TypeNode<'object'> {
72
+ export interface ObjectNode extends TypeNode<"object"> {
73
73
  /** The properties associated with an object */
74
74
  properties: {
75
75
  [name: string]: ObjectProperty;
@@ -81,7 +81,7 @@ export interface ObjectNode extends TypeNode<'object'> {
81
81
  }
82
82
  export type ObjectType = ObjectNode & CommonTypeInfo<object> & Annotations;
83
83
 
84
- export interface ArrayNode extends TypeNode<'array'> {
84
+ export interface ArrayNode extends TypeNode<"array"> {
85
85
  /** What types are allowed in the array */
86
86
  elementType: NodeType;
87
87
  }
@@ -89,7 +89,7 @@ export type ArrayType<T = unknown> = ArrayNode &
89
89
  CommonTypeInfo<Array<T>> &
90
90
  Annotations;
91
91
 
92
- export interface ConditionalNode extends TypeNode<'conditional'> {
92
+ export interface ConditionalNode extends TypeNode<"conditional"> {
93
93
  /** The check arguments */
94
94
  check: {
95
95
  /** operator */
@@ -117,7 +117,7 @@ export interface TupleMember {
117
117
  optional?: boolean;
118
118
  }
119
119
 
120
- export interface TupleNode extends TypeNode<'tuple'> {
120
+ export interface TupleNode extends TypeNode<"tuple"> {
121
121
  /** The types in the tuple */
122
122
  elementTypes: Array<TupleMember>;
123
123
  /** The minimum number of items */
@@ -129,24 +129,24 @@ export type TupleType<T extends unknown[] = unknown[]> = TupleNode &
129
129
  CommonTypeInfo<T> &
130
130
  Annotations;
131
131
 
132
- export type AndType = TypeNode<'and'> &
132
+ export type AndType = TypeNode<"and"> &
133
133
  Annotations & {
134
134
  /** Nodes in intersection */
135
135
  and: NodeType[];
136
136
  };
137
- export type OrType = TypeNode<'or'> &
137
+ export type OrType = TypeNode<"or"> &
138
138
  Annotations & {
139
139
  /** Nodes in the union */
140
140
  or: NodeType[];
141
141
  };
142
142
 
143
- export type TemplateLiteralType = TypeNode<'template'> &
143
+ export type TemplateLiteralType = TypeNode<"template"> &
144
144
  Annotations & {
145
145
  /** String version of regex used to validate template */
146
146
  format: string;
147
147
  };
148
148
 
149
- export type RecordType = TypeNode<'record'> &
149
+ export type RecordType = TypeNode<"record"> &
150
150
  Annotations & {
151
151
  /** Key types for the Record */
152
152
  keyType: NodeType;
@@ -165,7 +165,7 @@ export type FunctionTypeParameters = {
165
165
  default?: NodeType;
166
166
  };
167
167
 
168
- export type FunctionType = TypeNode<'function'> &
168
+ export type FunctionType = TypeNode<"function"> &
169
169
  Annotations & {
170
170
  /** Types for the parameters, in order, for the function */
171
171
  parameters: Array<FunctionTypeParameters>;
@@ -207,10 +207,9 @@ export type NodeType =
207
207
  | ConditionalType
208
208
  | VoidType;
209
209
 
210
- export type NodeTypeStrings = Pick<NodeType, 'type'>['type'];
210
+ export type NodeTypeStrings = Pick<NodeType, "type">["type"];
211
211
 
212
212
  export type NodeTypeMap = {
213
- // eslint-disable-next-line jsdoc/require-jsdoc
214
213
  [K in NodeTypeStrings]: Extract<NodeType, { type: K }>;
215
214
  };
216
215
 
package/src/index.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from './core';
2
- export * from './utility';
1
+ export * from "./core";
2
+ export * from "./utility";
package/src/utility.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { NamedType, NodeType } from '.';
1
+ import type { NamedType, NodeType } from ".";
2
2
 
3
3
  export type TransformFunction = (
4
4
  input: NamedType<NodeType> | NodeType,
@@ -0,0 +1,172 @@
1
+ export interface Annotations {
2
+ /** The name used to reference this type */
3
+ name?: string;
4
+ /** The path within a type to this type (may be the same as `name` ) */
5
+ title?: string;
6
+ /** The JSDoc string for this type */
7
+ description?: string;
8
+ /** The JSDoc `@example` string for this type */
9
+ examples?: string | Array<string>;
10
+ /** The JSDoc `@default` string for this type */
11
+ default?: string;
12
+ /** The JSDoc `@see` string for this type */
13
+ see?: string | Array<string>;
14
+ /** The Typescript comment associated with the type */
15
+ comment?: string;
16
+ /** The JSDoc `@meta` string for this type */
17
+ meta?: Record<string, string>;
18
+ }
19
+ export interface Const<T> {
20
+ /** The literal value for the node */
21
+ const?: T;
22
+ }
23
+ export interface Enum<T> {
24
+ /** The list of enums for the node */
25
+ enum?: Array<T>;
26
+ }
27
+ export type CommonTypeInfo<T> = Const<T> & Enum<T>;
28
+ export interface TypeNode<Name = string> {
29
+ /** The type of Node */
30
+ type: Name;
31
+ }
32
+ export type AnyType = TypeNode<"any"> & CommonTypeInfo<any> & Annotations;
33
+ export type UnknownType = TypeNode<"unknown"> & CommonTypeInfo<unknown> & Annotations;
34
+ export type UndefinedType = TypeNode<"undefined"> & CommonTypeInfo<undefined> & Annotations;
35
+ export type NullType = TypeNode<"null"> & CommonTypeInfo<null> & Annotations;
36
+ export type VoidType = TypeNode<"void"> & CommonTypeInfo<void> & Annotations;
37
+ export type StringType = TypeNode<"string"> & CommonTypeInfo<string> & Annotations;
38
+ export type NumberType = TypeNode<"number"> & CommonTypeInfo<number> & Annotations;
39
+ export type BooleanType = TypeNode<"boolean"> & CommonTypeInfo<boolean> & Annotations;
40
+ export type NeverType = TypeNode<"never"> & CommonTypeInfo<never> & Annotations;
41
+ export interface RefNode extends TypeNode<"ref"> {
42
+ /** Name of the referenced Type */
43
+ ref: string;
44
+ /** Parameters to potentially fill in a generic when it is resolved. Position is preserved */
45
+ genericArguments?: Array<NodeType>;
46
+ /** Optional property to access when the reference is resolved */
47
+ property?: string;
48
+ }
49
+ export type RefType = RefNode & Annotations;
50
+ export interface ObjectProperty {
51
+ /** If this property is required */
52
+ required: boolean;
53
+ /** The type of the property */
54
+ node: NodeType;
55
+ }
56
+ export interface ObjectNode extends TypeNode<"object"> {
57
+ /** The properties associated with an object */
58
+ properties: {
59
+ [name: string]: ObjectProperty;
60
+ };
61
+ /** A custom primitive that this object extends that is to be resolved when used */
62
+ extends?: RefType;
63
+ /** What type, if any, of additional properties are allowed on the object */
64
+ additionalProperties: false | NodeType;
65
+ }
66
+ export type ObjectType = ObjectNode & CommonTypeInfo<object> & Annotations;
67
+ export interface ArrayNode extends TypeNode<"array"> {
68
+ /** What types are allowed in the array */
69
+ elementType: NodeType;
70
+ }
71
+ export type ArrayType<T = unknown> = ArrayNode & CommonTypeInfo<Array<T>> & Annotations;
72
+ export interface ConditionalNode extends TypeNode<"conditional"> {
73
+ /** The check arguments */
74
+ check: {
75
+ /** operator */
76
+ left: NodeType;
77
+ /** operand */
78
+ right: NodeType;
79
+ };
80
+ /** The resulting values to use */
81
+ value: {
82
+ /** If the conditional is true */
83
+ true: NodeType;
84
+ /** If the conditional is false */
85
+ false: NodeType;
86
+ };
87
+ }
88
+ export type ConditionalType = ConditionalNode & Annotations;
89
+ export interface TupleMember {
90
+ /** Optional Name of the Tuple Member */
91
+ name?: string;
92
+ /** Type constraint of the Tuple Member */
93
+ type: NodeType;
94
+ /** Is the Tuple Member Optional */
95
+ optional?: boolean;
96
+ }
97
+ export interface TupleNode extends TypeNode<"tuple"> {
98
+ /** The types in the tuple */
99
+ elementTypes: Array<TupleMember>;
100
+ /** The minimum number of items */
101
+ minItems: number;
102
+ /** What, if any, additional types can be provided */
103
+ additionalItems: false | NodeType;
104
+ }
105
+ export type TupleType<T extends unknown[] = unknown[]> = TupleNode & CommonTypeInfo<T> & Annotations;
106
+ export type AndType = TypeNode<"and"> & Annotations & {
107
+ /** Nodes in intersection */
108
+ and: NodeType[];
109
+ };
110
+ export type OrType = TypeNode<"or"> & Annotations & {
111
+ /** Nodes in the union */
112
+ or: NodeType[];
113
+ };
114
+ export type TemplateLiteralType = TypeNode<"template"> & Annotations & {
115
+ /** String version of regex used to validate template */
116
+ format: string;
117
+ };
118
+ export type RecordType = TypeNode<"record"> & Annotations & {
119
+ /** Key types for the Record */
120
+ keyType: NodeType;
121
+ /** Value types for the Record */
122
+ valueType: NodeType;
123
+ };
124
+ export type FunctionTypeParameters = {
125
+ /** String name of the function parameter */
126
+ name: string;
127
+ /** The type constraint of the parameter */
128
+ type: NodeType;
129
+ /** Indicates that the parameter is optional */
130
+ optional?: true;
131
+ /** Default value for the parameter if nothing is supplied */
132
+ default?: NodeType;
133
+ };
134
+ export type FunctionType = TypeNode<"function"> & Annotations & {
135
+ /** Types for the parameters, in order, for the function */
136
+ parameters: Array<FunctionTypeParameters>;
137
+ /** Return type of the function */
138
+ returnType?: NodeType;
139
+ };
140
+ /** Primitive Type Nodes */
141
+ export type PrimitiveTypes = NeverType | NullType | StringType | NumberType | BooleanType | AnyType | UnknownType | UndefinedType | VoidType;
142
+ /** Set of all Node Types */
143
+ export type NodeType = AnyType | UnknownType | UndefinedType | NullType | NeverType | StringType | TemplateLiteralType | NumberType | BooleanType | ObjectType | ArrayType | TupleType | RecordType | AndType | OrType | RefType | FunctionType | ConditionalType | VoidType;
144
+ export type NodeTypeStrings = Pick<NodeType, "type">["type"];
145
+ export type NodeTypeMap = {
146
+ [K in NodeTypeStrings]: Extract<NodeType, {
147
+ type: K;
148
+ }>;
149
+ };
150
+ export type NamedType<T extends NodeType = NodeType> = T & {
151
+ /** Name of the exported interface/type */
152
+ name: string;
153
+ /** File the type was exported from */
154
+ source: string;
155
+ };
156
+ export interface ParamTypeNode {
157
+ /** Symbol used to identify the generic in the interface/type */
158
+ symbol: string;
159
+ /** The type constraint for the generic */
160
+ constraints?: NodeType;
161
+ /** The default value for the generic if no value is provided */
162
+ default?: NodeType;
163
+ }
164
+ export type NamedTypeWithGenerics<T extends NodeType = NodeType> = NamedType<T> & {
165
+ /** Generics for the Named Type that need to be filled in */
166
+ genericTokens: Array<ParamTypeNode>;
167
+ };
168
+ export type NodeTypeWithGenerics<T extends NodeType = NodeType> = T & {
169
+ /** Generics for the Node that need to be filled in */
170
+ genericTokens: Array<ParamTypeNode>;
171
+ };
172
+ //# sourceMappingURL=core.d.ts.map
@@ -0,0 +1,3 @@
1
+ export * from "./core";
2
+ export * from "./utility";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,25 @@
1
+ import type { NamedType, NodeType } from ".";
2
+ export type TransformFunction = (input: NamedType<NodeType> | NodeType, capabilityType: string) => NamedType | NodeType;
3
+ export interface Capability {
4
+ /** Name of the capability that is provided to Player */
5
+ name: string;
6
+ /** List of XLRs that are provided for the Capability */
7
+ provides: Array<string>;
8
+ }
9
+ export interface Manifest {
10
+ /** Name of the plugin */
11
+ pluginName: string;
12
+ /** Map of capabilities provided by the plugin to the name of the XLR for the capabilities */
13
+ capabilities?: Map<string, Array<string>>;
14
+ /** CustomPrimitives that are the most basic types in the Payer Ecosystem */
15
+ customPrimitives?: Array<string>;
16
+ }
17
+ export interface TSManifest {
18
+ /** Name of the plugin */
19
+ pluginName: string;
20
+ /** Index of capabilities provided by the plugin to the name of the XLR for the capabilities */
21
+ capabilities: {
22
+ [capability: string]: Array<NamedType>;
23
+ };
24
+ }
25
+ //# sourceMappingURL=utility.d.ts.map
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # @player-tools/xlr
2
-
3
- Type definitions for the XLR AST Nodes and other cross package definitions.
package/dist/index.cjs.js DELETED
@@ -1,3 +0,0 @@
1
- 'use strict';
2
-
3
- //# sourceMappingURL=index.cjs.js.map
package/dist/index.d.ts DELETED
@@ -1,197 +0,0 @@
1
- interface Annotations {
2
- /** The name used to reference this type */
3
- name?: string;
4
- /** The path within a type to this type (may be the same as `name` ) */
5
- title?: string;
6
- /** The JSDoc string for this type */
7
- description?: string;
8
- /** The JSDoc `@example` string for this type */
9
- examples?: string | Array<string>;
10
- /** The JSDoc `@default` string for this type */
11
- default?: string;
12
- /** The JSDoc `@see` string for this type */
13
- see?: string | Array<string>;
14
- /** The Typescript comment associated with the type */
15
- comment?: string;
16
- /** The JSDoc `@meta` string for this type */
17
- meta?: Record<string, string>;
18
- }
19
- interface Const<T> {
20
- /** The literal value for the node */
21
- const?: T;
22
- }
23
- interface Enum<T> {
24
- /** The list of enums for the node */
25
- enum?: Array<T>;
26
- }
27
- declare type CommonTypeInfo<T> = Const<T> & Enum<T>;
28
- interface TypeNode<Name = string> {
29
- /** The type of Node */
30
- type: Name;
31
- }
32
- declare type AnyType = TypeNode<'any'> & CommonTypeInfo<any> & Annotations;
33
- declare type UnknownType = TypeNode<'unknown'> & CommonTypeInfo<unknown> & Annotations;
34
- declare type UndefinedType = TypeNode<'undefined'> & CommonTypeInfo<undefined> & Annotations;
35
- declare type NullType = TypeNode<'null'> & CommonTypeInfo<null> & Annotations;
36
- declare type VoidType = TypeNode<'void'> & CommonTypeInfo<void> & Annotations;
37
- declare type StringType = TypeNode<'string'> & CommonTypeInfo<string> & Annotations;
38
- declare type NumberType = TypeNode<'number'> & CommonTypeInfo<number> & Annotations;
39
- declare type BooleanType = TypeNode<'boolean'> & CommonTypeInfo<boolean> & Annotations;
40
- declare type NeverType = TypeNode<'never'> & CommonTypeInfo<never> & Annotations;
41
- interface RefNode extends TypeNode<'ref'> {
42
- /** Name of the referenced Type */
43
- ref: string;
44
- /** Parameters to potentially fill in a generic when it is resolved. Position is preserved */
45
- genericArguments?: Array<NodeType>;
46
- /** Optional property to access when the reference is resolved */
47
- property?: string;
48
- }
49
- declare type RefType = RefNode & Annotations;
50
- interface ObjectProperty {
51
- /** If this property is required */
52
- required: boolean;
53
- /** The type of the property */
54
- node: NodeType;
55
- }
56
- interface ObjectNode extends TypeNode<'object'> {
57
- /** The properties associated with an object */
58
- properties: {
59
- [name: string]: ObjectProperty;
60
- };
61
- /** A custom primitive that this object extends that is to be resolved when used */
62
- extends?: RefType;
63
- /** What type, if any, of additional properties are allowed on the object */
64
- additionalProperties: false | NodeType;
65
- }
66
- declare type ObjectType = ObjectNode & CommonTypeInfo<object> & Annotations;
67
- interface ArrayNode extends TypeNode<'array'> {
68
- /** What types are allowed in the array */
69
- elementType: NodeType;
70
- }
71
- declare type ArrayType<T = unknown> = ArrayNode & CommonTypeInfo<Array<T>> & Annotations;
72
- interface ConditionalNode extends TypeNode<'conditional'> {
73
- /** The check arguments */
74
- check: {
75
- /** operator */
76
- left: NodeType;
77
- /** operand */
78
- right: NodeType;
79
- };
80
- /** The resulting values to use */
81
- value: {
82
- /** If the conditional is true */
83
- true: NodeType;
84
- /** If the conditional is false */
85
- false: NodeType;
86
- };
87
- }
88
- declare type ConditionalType = ConditionalNode & Annotations;
89
- interface TupleMember {
90
- /** Optional Name of the Tuple Member */
91
- name?: string;
92
- /** Type constraint of the Tuple Member */
93
- type: NodeType;
94
- /** Is the Tuple Member Optional */
95
- optional?: boolean;
96
- }
97
- interface TupleNode extends TypeNode<'tuple'> {
98
- /** The types in the tuple */
99
- elementTypes: Array<TupleMember>;
100
- /** The minimum number of items */
101
- minItems: number;
102
- /** What, if any, additional types can be provided */
103
- additionalItems: false | NodeType;
104
- }
105
- declare type TupleType<T extends unknown[] = unknown[]> = TupleNode & CommonTypeInfo<T> & Annotations;
106
- declare type AndType = TypeNode<'and'> & Annotations & {
107
- /** Nodes in intersection */
108
- and: NodeType[];
109
- };
110
- declare type OrType = TypeNode<'or'> & Annotations & {
111
- /** Nodes in the union */
112
- or: NodeType[];
113
- };
114
- declare type TemplateLiteralType = TypeNode<'template'> & Annotations & {
115
- /** String version of regex used to validate template */
116
- format: string;
117
- };
118
- declare type RecordType = TypeNode<'record'> & Annotations & {
119
- /** Key types for the Record */
120
- keyType: NodeType;
121
- /** Value types for the Record */
122
- valueType: NodeType;
123
- };
124
- declare type FunctionTypeParameters = {
125
- /** String name of the function parameter */
126
- name: string;
127
- /** The type constraint of the parameter */
128
- type: NodeType;
129
- /** Indicates that the parameter is optional */
130
- optional?: true;
131
- /** Default value for the parameter if nothing is supplied */
132
- default?: NodeType;
133
- };
134
- declare type FunctionType = TypeNode<'function'> & Annotations & {
135
- /** Types for the parameters, in order, for the function */
136
- parameters: Array<FunctionTypeParameters>;
137
- /** Return type of the function */
138
- returnType?: NodeType;
139
- };
140
- /** Primitive Type Nodes */
141
- declare type PrimitiveTypes = NeverType | NullType | StringType | NumberType | BooleanType | AnyType | UnknownType | UndefinedType | VoidType;
142
- /** Set of all Node Types */
143
- declare type NodeType = AnyType | UnknownType | UndefinedType | NullType | NeverType | StringType | TemplateLiteralType | NumberType | BooleanType | ObjectType | ArrayType | TupleType | RecordType | AndType | OrType | RefType | FunctionType | ConditionalType | VoidType;
144
- declare type NodeTypeStrings = Pick<NodeType, 'type'>['type'];
145
- declare type NodeTypeMap = {
146
- [K in NodeTypeStrings]: Extract<NodeType, {
147
- type: K;
148
- }>;
149
- };
150
- declare type NamedType<T extends NodeType = NodeType> = T & {
151
- /** Name of the exported interface/type */
152
- name: string;
153
- /** File the type was exported from */
154
- source: string;
155
- };
156
- interface ParamTypeNode {
157
- /** Symbol used to identify the generic in the interface/type */
158
- symbol: string;
159
- /** The type constraint for the generic */
160
- constraints?: NodeType;
161
- /** The default value for the generic if no value is provided */
162
- default?: NodeType;
163
- }
164
- declare type NamedTypeWithGenerics<T extends NodeType = NodeType> = NamedType<T> & {
165
- /** Generics for the Named Type that need to be filled in */
166
- genericTokens: Array<ParamTypeNode>;
167
- };
168
- declare type NodeTypeWithGenerics<T extends NodeType = NodeType> = T & {
169
- /** Generics for the Node that need to be filled in */
170
- genericTokens: Array<ParamTypeNode>;
171
- };
172
-
173
- declare type TransformFunction = (input: NamedType<NodeType> | NodeType, capabilityType: string) => NamedType | NodeType;
174
- interface Capability {
175
- /** Name of the capability that is provided to Player */
176
- name: string;
177
- /** List of XLRs that are provided for the Capability */
178
- provides: Array<string>;
179
- }
180
- interface Manifest {
181
- /** Name of the plugin */
182
- pluginName: string;
183
- /** Map of capabilities provided by the plugin to the name of the XLR for the capabilities */
184
- capabilities?: Map<string, Array<string>>;
185
- /** CustomPrimitives that are the most basic types in the Payer Ecosystem */
186
- customPrimitives?: Array<string>;
187
- }
188
- interface TSManifest {
189
- /** Name of the plugin */
190
- pluginName: string;
191
- /** Index of capabilities provided by the plugin to the name of the XLR for the capabilities */
192
- capabilities: {
193
- [capability: string]: Array<NamedType>;
194
- };
195
- }
196
-
197
- export { AndType, Annotations, AnyType, ArrayNode, ArrayType, BooleanType, Capability, CommonTypeInfo, ConditionalNode, ConditionalType, Const, Enum, FunctionType, FunctionTypeParameters, Manifest, NamedType, NamedTypeWithGenerics, NeverType, NodeType, NodeTypeMap, NodeTypeStrings, NodeTypeWithGenerics, NullType, NumberType, ObjectNode, ObjectProperty, ObjectType, OrType, ParamTypeNode, PrimitiveTypes, RecordType, RefNode, RefType, StringType, TSManifest, TemplateLiteralType, TransformFunction, TupleMember, TupleNode, TupleType, TypeNode, UndefinedType, UnknownType, VoidType };
package/dist/index.esm.js DELETED
@@ -1,2 +0,0 @@
1
-
2
- //# sourceMappingURL=index.esm.js.map