chore: add generated files for #8805 (#8826)

This commit is contained in:
Retsam 2018-10-08 13:29:33 -04:00 committed by Brian Ng
parent 08454ece46
commit 3951acbff5
3 changed files with 23 additions and 0 deletions

View File

@ -828,6 +828,9 @@ export function assertTSTupleType(node: Object, opts?: Object = {}): void {
export function assertTSOptionalType(node: Object, opts?: Object = {}): void {
assert("TSOptionalType", node, opts);
}
export function assertTSRestType(node: Object, opts?: Object = {}): void {
assert("TSRestType", node, opts);
}
export function assertTSUnionType(node: Object, opts?: Object = {}): void {
assert("TSUnionType", node, opts);
}

View File

@ -798,6 +798,11 @@ export function TSOptionalType(...args: Array<any>): Object {
}
export { TSOptionalType as tsOptionalType };
export { TSOptionalType as tSOptionalType };
export function TSRestType(...args: Array<any>): Object {
return builder("TSRestType", ...args);
}
export { TSRestType as tsRestType };
export { TSRestType as tSRestType };
export function TSUnionType(...args: Array<any>): Object {
return builder("TSUnionType", ...args);
}

View File

@ -2686,6 +2686,20 @@ export function isTSOptionalType(node: Object, opts?: Object): boolean {
return false;
}
export function isTSRestType(node: Object, opts?: Object): boolean {
if (!node) return false;
const nodeType = node.type;
if (nodeType === "TSRestType") {
if (typeof opts === "undefined") {
return true;
} else {
return shallowEqual(node, opts);
}
}
return false;
}
export function isTSUnionType(node: Object, opts?: Object): boolean {
if (!node) return false;
@ -4164,6 +4178,7 @@ export function isTSType(node: Object, opts?: Object): boolean {
"TSArrayType" === nodeType ||
"TSTupleType" === nodeType ||
"TSOptionalType" === nodeType ||
"TSRestType" === nodeType ||
"TSUnionType" === nodeType ||
"TSIntersectionType" === nodeType ||
"TSConditionalType" === nodeType ||