chrome-types-helpers
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -23,3 +23,3 @@ export class Node { | ||
} | ||
export class Property extends Node { | ||
export class Property extends types.Node { | ||
/** | ||
@@ -30,3 +30,3 @@ * @param {Type} type | ||
constructor(type: Type, name: string); | ||
type: Type; | ||
type: types.Type; | ||
/** @type {boolean} */ | ||
@@ -36,3 +36,3 @@ optional: boolean; | ||
isType: boolean; | ||
clone(): Property; | ||
clone(): types.Property; | ||
/** | ||
@@ -44,11 +44,11 @@ * @param {(path: string[], prop: Property) => void} fn | ||
} | ||
export class Namespace extends Node { | ||
export class Namespace extends types.Node { | ||
/** @type {{[name: string]: Property}} */ | ||
all: { | ||
[name: string]: Property; | ||
[name: string]: types.Property; | ||
}; | ||
get types(): Property[]; | ||
get properties(): Property[]; | ||
get methods(): Property[]; | ||
get events(): Property[]; | ||
get types(): types.Property[]; | ||
get properties(): types.Property[]; | ||
get methods(): types.Property[]; | ||
get events(): types.Property[]; | ||
/** | ||
@@ -77,6 +77,6 @@ * Traverse all child properties in this namespace. Does not traverse the namespace itself. | ||
} | ||
export class PrimitiveType extends Type { | ||
export class PrimitiveType extends types.Type { | ||
primitiveType: string; | ||
} | ||
export class LiteralType extends Type { | ||
export class LiteralType extends types.Type { | ||
/** | ||
@@ -89,3 +89,3 @@ * @param {string|number} value | ||
} | ||
export class NumberPrimitiveType extends PrimitiveType { | ||
export class NumberPrimitiveType extends types.PrimitiveType { | ||
/** | ||
@@ -101,3 +101,3 @@ * @param {boolean} isFloat | ||
} | ||
export class RefType extends Type { | ||
export class RefType extends types.Type { | ||
/** | ||
@@ -111,5 +111,5 @@ * @param {string} name | ||
internal: boolean; | ||
templates: Type[]; | ||
templates: types.Type[]; | ||
} | ||
export class SequenceType extends Type { | ||
export class SequenceType extends types.Type { | ||
/** | ||
@@ -121,7 +121,7 @@ * @param {Type} itemType | ||
constructor(itemType: Type, minItems?: number | undefined, maxItems?: number | undefined); | ||
itemType: Type; | ||
itemType: types.Type; | ||
minItems: number; | ||
maxItems: number; | ||
} | ||
export class ObjectType extends Type { | ||
export class ObjectType extends types.Type { | ||
/** | ||
@@ -132,8 +132,8 @@ * @param {{[name: string]: Property}} properties | ||
constructor(properties: { | ||
[name: string]: Property; | ||
[name: string]: types.Property; | ||
}, additionalProperties?: Type | null); | ||
properties: { | ||
[name: string]: Property; | ||
[name: string]: types.Property; | ||
}; | ||
additionalProperties: Type; | ||
additionalProperties: types.Type; | ||
/** @type {Property[]} */ | ||
@@ -144,3 +144,3 @@ templates: Property[]; | ||
} | ||
export class UnionType extends Type { | ||
export class UnionType extends types.Type { | ||
/** | ||
@@ -150,5 +150,5 @@ * @param {Type[]} types | ||
constructor(types: Type[]); | ||
types: Type[]; | ||
types: types.Type[]; | ||
} | ||
export class ChoicesType extends Type { | ||
export class ChoicesType extends types.Type { | ||
/** | ||
@@ -158,5 +158,5 @@ * @param {Type[]} choices | ||
constructor(choices: Type[]); | ||
choices: Type[]; | ||
choices: types.Type[]; | ||
} | ||
export class FunctionType extends Type { | ||
export class FunctionType extends types.Type { | ||
/** | ||
@@ -174,9 +174,9 @@ * @param {Property[]} parameters | ||
isReturnsAsync: boolean; | ||
get parametersForAsync(): Property[]; | ||
get callbackForAsync(): Property; | ||
get returnType(): Type; | ||
get returnTypeForAsync(): import("./model.js").RefType | PrimitiveType; | ||
get returnPropertyForAsync(): Property; | ||
singleExpansion(): Property[]; | ||
get expansions(): Property[][]; | ||
get parametersForAsync(): types.Property[]; | ||
get callbackForAsync(): types.Property; | ||
get returnType(): types.Type; | ||
get returnTypeForAsync(): types.PrimitiveType | types.RefType; | ||
get returnPropertyForAsync(): types.Property; | ||
singleExpansion(): types.Property[]; | ||
get expansions(): types.Property[][]; | ||
/** | ||
@@ -187,4 +187,4 @@ * @param {(returns: Property, ...parameters: Property[]) => void} fn | ||
} | ||
export const voidType: PrimitiveType; | ||
export const requiredTemplateType: Type; | ||
export const voidType: types.PrimitiveType; | ||
export const requiredTemplateType: types.Type; | ||
import * as types from "../../types/index.js"; |
@@ -5,3 +5,3 @@ { | ||
"license": "Apache-2.0", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"type": "module", | ||
@@ -39,3 +39,3 @@ "dependencies": { | ||
"rollup": "rollup --format=cjs --file=lib-gen-main.cjs -- lib/gen/main.js", | ||
"ts-fix": "tsc --declaration --emitDeclarationOnly --allowJs --outDir ts-fix lib/gen/model.js; cp ts-fix/model.d.ts lib/gen/model.d.ts", | ||
"ts-fix": "rm -f lib/gen/model.d.ts; tsc --declaration --emitDeclarationOnly --allowJs --outDir ts-fix lib/gen/model.js; cp ts-fix/model.d.ts lib/gen/model.d.ts", | ||
"prepublishOnly": "npm run rollup; npm run ts-fix", | ||
@@ -42,0 +42,0 @@ "prepareChromeTypes": "node ./bin/prepare-types.js" |
/** | ||
* @param {model.Type} fn | ||
*/ | ||
export function convertFunctionToPromise(fn: model.Type): model.RefType; | ||
export function convertFunctionToPromise(fn: model.Type): types.RefType; | ||
/** | ||
@@ -6,0 +6,0 @@ * @param {model.Property} returns |
@@ -23,3 +23,3 @@ export class Node { | ||
} | ||
export class Property extends Node { | ||
export class Property extends types.Node { | ||
/** | ||
@@ -30,3 +30,3 @@ * @param {Type} type | ||
constructor(type: Type, name: string); | ||
type: Type; | ||
type: types.Type; | ||
/** @type {boolean} */ | ||
@@ -36,3 +36,3 @@ optional: boolean; | ||
isType: boolean; | ||
clone(): Property; | ||
clone(): types.Property; | ||
/** | ||
@@ -44,11 +44,11 @@ * @param {(path: string[], prop: Property) => void} fn | ||
} | ||
export class Namespace extends Node { | ||
export class Namespace extends types.Node { | ||
/** @type {{[name: string]: Property}} */ | ||
all: { | ||
[name: string]: Property; | ||
[name: string]: types.Property; | ||
}; | ||
get types(): Property[]; | ||
get properties(): Property[]; | ||
get methods(): Property[]; | ||
get events(): Property[]; | ||
get types(): types.Property[]; | ||
get properties(): types.Property[]; | ||
get methods(): types.Property[]; | ||
get events(): types.Property[]; | ||
/** | ||
@@ -77,6 +77,6 @@ * Traverse all child properties in this namespace. Does not traverse the namespace itself. | ||
} | ||
export class PrimitiveType extends Type { | ||
export class PrimitiveType extends types.Type { | ||
primitiveType: string; | ||
} | ||
export class LiteralType extends Type { | ||
export class LiteralType extends types.Type { | ||
/** | ||
@@ -89,3 +89,3 @@ * @param {string|number} value | ||
} | ||
export class NumberPrimitiveType extends PrimitiveType { | ||
export class NumberPrimitiveType extends types.PrimitiveType { | ||
/** | ||
@@ -101,3 +101,3 @@ * @param {boolean} isFloat | ||
} | ||
export class RefType extends Type { | ||
export class RefType extends types.Type { | ||
/** | ||
@@ -111,5 +111,5 @@ * @param {string} name | ||
internal: boolean; | ||
templates: Type[]; | ||
templates: types.Type[]; | ||
} | ||
export class SequenceType extends Type { | ||
export class SequenceType extends types.Type { | ||
/** | ||
@@ -121,7 +121,7 @@ * @param {Type} itemType | ||
constructor(itemType: Type, minItems?: number | undefined, maxItems?: number | undefined); | ||
itemType: Type; | ||
itemType: types.Type; | ||
minItems: number; | ||
maxItems: number; | ||
} | ||
export class ObjectType extends Type { | ||
export class ObjectType extends types.Type { | ||
/** | ||
@@ -132,8 +132,8 @@ * @param {{[name: string]: Property}} properties | ||
constructor(properties: { | ||
[name: string]: Property; | ||
[name: string]: types.Property; | ||
}, additionalProperties?: Type | null); | ||
properties: { | ||
[name: string]: Property; | ||
[name: string]: types.Property; | ||
}; | ||
additionalProperties: Type; | ||
additionalProperties: types.Type; | ||
/** @type {Property[]} */ | ||
@@ -144,3 +144,3 @@ templates: Property[]; | ||
} | ||
export class UnionType extends Type { | ||
export class UnionType extends types.Type { | ||
/** | ||
@@ -150,5 +150,5 @@ * @param {Type[]} types | ||
constructor(types: Type[]); | ||
types: Type[]; | ||
types: types.Type[]; | ||
} | ||
export class ChoicesType extends Type { | ||
export class ChoicesType extends types.Type { | ||
/** | ||
@@ -158,5 +158,5 @@ * @param {Type[]} choices | ||
constructor(choices: Type[]); | ||
choices: Type[]; | ||
choices: types.Type[]; | ||
} | ||
export class FunctionType extends Type { | ||
export class FunctionType extends types.Type { | ||
/** | ||
@@ -174,9 +174,9 @@ * @param {Property[]} parameters | ||
isReturnsAsync: boolean; | ||
get parametersForAsync(): Property[]; | ||
get callbackForAsync(): Property; | ||
get returnType(): Type; | ||
get returnTypeForAsync(): import("./model.js").RefType | PrimitiveType; | ||
get returnPropertyForAsync(): Property; | ||
singleExpansion(): Property[]; | ||
get expansions(): Property[][]; | ||
get parametersForAsync(): types.Property[]; | ||
get callbackForAsync(): types.Property; | ||
get returnType(): types.Type; | ||
get returnTypeForAsync(): types.PrimitiveType | types.RefType; | ||
get returnPropertyForAsync(): types.Property; | ||
singleExpansion(): types.Property[]; | ||
get expansions(): types.Property[][]; | ||
/** | ||
@@ -187,4 +187,4 @@ * @param {(returns: Property, ...parameters: Property[]) => void} fn | ||
} | ||
export const voidType: PrimitiveType; | ||
export const requiredTemplateType: Type; | ||
export const voidType: types.PrimitiveType; | ||
export const requiredTemplateType: types.Type; | ||
import * as types from "../../types/index.js"; |
@@ -26,2 +26,3 @@ /** | ||
import * as model from '../lib/gen/model.js'; | ||
export * from '../lib/gen/model.js'; | ||
@@ -28,0 +29,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
202141
5706