.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / tsutils / util / type.d.ts
1 import * as ts from 'typescript';\r
2 import { PropertyName } from './util';\r
3 export declare function isEmptyObjectType(type: ts.Type): type is ts.ObjectType;\r
4 export declare function removeOptionalityFromType(checker: ts.TypeChecker, type: ts.Type): ts.Type;\r
5 export declare function removeOptionalChainingUndefinedMarkerType(checker: ts.TypeChecker, type: ts.Type): ts.Type;\r
6 export declare function isOptionalChainingUndefinedMarkerType(checker: ts.TypeChecker, t: ts.Type): boolean;\r
7 export declare function isTypeAssignableToNumber(checker: ts.TypeChecker, type: ts.Type): boolean;\r
8 export declare function isTypeAssignableToString(checker: ts.TypeChecker, type: ts.Type): boolean;\r
9 export declare function getCallSignaturesOfType(type: ts.Type): ReadonlyArray<ts.Signature>;\r
10 /** Returns all types of a union type or an array containing `type` itself if it's no union type. */\r
11 export declare function unionTypeParts(type: ts.Type): ts.Type[];\r
12 /** Returns all types of a intersection type or an array containing `type` itself if it's no intersection type. */\r
13 export declare function intersectionTypeParts(type: ts.Type): ts.Type[];\r
14 export declare function someTypePart(type: ts.Type, predicate: (t: ts.Type) => t is ts.UnionOrIntersectionType, cb: (t: ts.Type) => boolean): boolean;\r
15 /** Determines if a type thenable and can be used with `await`. */\r
16 export declare function isThenableType(checker: ts.TypeChecker, node: ts.Node, type: ts.Type): boolean;\r
17 /** Determines if a type thenable and can be used with `await`. */\r
18 export declare function isThenableType(checker: ts.TypeChecker, node: ts.Expression, type?: ts.Type): boolean;\r
19 /** Determine if a type is definitely falsy. This function doesn't unwrap union types. */\r
20 export declare function isFalsyType(type: ts.Type): boolean;\r
21 /** Determines whether the given type is a boolean literal type and matches the given boolean literal (true or false). */\r
22 export declare function isBooleanLiteralType(type: ts.Type, literal: boolean): boolean;\r
23 export declare function getPropertyOfType(type: ts.Type, name: ts.__String): ts.Symbol | undefined;\r
24 export declare function getWellKnownSymbolPropertyOfType(type: ts.Type, wellKnownSymbolName: string, checker: ts.TypeChecker): ts.Symbol | undefined;\r
25 /** Determines if writing to a certain property of a given type is allowed. */\r
26 export declare function isPropertyReadonlyInType(type: ts.Type, name: ts.__String, checker: ts.TypeChecker): boolean;\r
27 export declare function symbolHasReadonlyDeclaration(symbol: ts.Symbol, checker: ts.TypeChecker): boolean;\r
28 /** Returns the the literal name or unique symbol name from a given type. Doesn't unwrap union types. */\r
29 export declare function getPropertyNameFromType(type: ts.Type): PropertyName | undefined;\r
30 export declare function getSymbolOfClassLikeDeclaration(node: ts.ClassLikeDeclaration, checker: ts.TypeChecker): ts.Symbol;\r
31 export declare function getConstructorTypeOfClassLikeDeclaration(node: ts.ClassLikeDeclaration, checker: ts.TypeChecker): ts.Type;\r
32 export declare function getInstanceTypeOfClassLikeDeclaration(node: ts.ClassLikeDeclaration, checker: ts.TypeChecker): ts.Type;\r
33 export declare function getIteratorYieldResultFromIteratorResult(type: ts.Type, node: ts.Node, checker: ts.TypeChecker): ts.Type;\r
34 /** Lookup the declaration of a class member in the super class. */\r
35 export declare function getBaseClassMemberOfClassElement(node: ts.PropertyDeclaration | ts.MethodDeclaration | ts.AccessorDeclaration, checker: ts.TypeChecker): ts.Symbol | undefined;\r