Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

type.d.ts 3.4KB

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