Liking cljdoc? Tell your friends :D
ClojureScript only.

dots.typescript.type-checker


aliased-symbolcljs

(aliased-symbol type-checker symbol)

Follow all aliases to get the original symbol.

Parameters:

  • symbol: Symbol

Returns: Symbol

Follow all aliases to get the original symbol.

**Parameters:**
- `symbol`: `Symbol`

**Returns:** `Symbol`
sourceraw docstring

ambient-modulescljs

(ambient-modules type-checker)

Returns: Symbol[]

**Returns:** `Symbol[]`
sourceraw docstring

any-typecljs

(any-type type-checker)

Gets the intrinsic any type. There are multiple types that act as any used internally in the compiler, so the type returned by this function should not be used in equality checks to determine if another type is any. Instead, use type.flags & TypeFlags.Any.

Returns: Type

Gets the intrinsic `any` type. There are multiple types that act as `any` used internally in the compiler,
so the type returned by this function should not be used in equality checks to determine if another type
is `any`. Instead, use `type.flags & TypeFlags.Any`.

**Returns:** `Type`
sourceraw docstring

apparent-typecljs

(apparent-type type-checker type)

Parameters:

  • type: Type

Returns: Type

**Parameters:**
- `type`: `Type`

**Returns:** `Type`
sourceraw docstring

arguments-symbol?cljs

(arguments-symbol? type-checker symbol)

Parameters:

  • symbol: Symbol

Returns: boolean

**Parameters:**
- `symbol`: `Symbol`

**Returns:** `boolean`
sourceraw docstring

array-like-type?cljs

(array-like-type? type-checker type)

True if this type is assignable to ReadonlyArray<any>.

Parameters:

  • type: Type

Returns: boolean

True if this type is assignable to `ReadonlyArray<any>`.

**Parameters:**
- `type`: `Type`

**Returns:** `boolean`
sourceraw docstring

array-type?cljs

(array-type? type-checker type)

True if this type is the Array or ReadonlyArray type from lib.d.ts. This function will not return true if passed a type which extends Array (for example, the TypeScript AST's NodeArray type).

Parameters:

  • type: Type

Returns: boolean

True if this type is the `Array` or `ReadonlyArray` type from lib.d.ts.
This function will _not_ return true if passed a type which
extends `Array` (for example, the TypeScript AST's `NodeArray` type).

**Parameters:**
- `type`: `Type`

**Returns:** `boolean`
sourceraw docstring

augmented-properties-of-typecljs

(augmented-properties-of-type type-checker type)

Parameters:

  • type: Type

Returns: Symbol[]

**Parameters:**
- `type`: `Type`

**Returns:** `Symbol[]`
sourceraw docstring

base-constraint-of-typecljs

(base-constraint-of-type type-checker type)

Parameters:

  • type: Type

Returns: Type | undefined

**Parameters:**
- `type`: `Type`

**Returns:** `Type | undefined`
sourceraw docstring

base-type-of-literal-typecljs

(base-type-of-literal-type type-checker type)

Parameters:

  • type: Type

Returns: Type

**Parameters:**
- `type`: `Type`

**Returns:** `Type`
sourceraw docstring

base-typescljs

(base-types type-checker type)

Parameters:

  • type: InterfaceType

Returns: BaseType[]

**Parameters:**
- `type`: `InterfaceType`

**Returns:** `BaseType[]`
sourceraw docstring

big-int-typecljs

(big-int-type type-checker)

Returns: Type

**Returns:** `Type`
sourceraw docstring

boolean-typecljs

(boolean-type type-checker)

Returns: Type

**Returns:** `Type`
sourceraw docstring

constant-valuecljs

(constant-value type-checker node)

Parameters:

  • node: ElementAccessExpression | PropertyAccessExpression | EnumMember

Returns: string | number | undefined

**Parameters:**
- `node`: `ElementAccessExpression | PropertyAccessExpression | EnumMember`

**Returns:** `string | number | undefined`
sourceraw docstring

contextual-typecljs

(contextual-type type-checker node)

Parameters:

  • node: Expression

Returns: Type | undefined

**Parameters:**
- `node`: `Expression`

**Returns:** `Type | undefined`
sourceraw docstring

declared-type-of-symbolcljs

(declared-type-of-symbol type-checker symbol)

Parameters:

  • symbol: Symbol

Returns: Type

**Parameters:**
- `symbol`: `Symbol`

**Returns:** `Type`
sourceraw docstring

default-from-type-parametercljs

(default-from-type-parameter type-checker type)

Parameters:

  • type: Type

Returns: Type | undefined

**Parameters:**
- `type`: `Type`

**Returns:** `Type | undefined`
sourceraw docstring

es-symbol-typecljs

(es-symbol-type type-checker)

Returns: Type

**Returns:** `Type`
sourceraw docstring

export-specifier-local-target-symbolcljs

(export-specifier-local-target-symbol type-checker location)

Parameters:

  • location: Identifier | ExportSpecifier

Returns: Symbol | undefined

**Parameters:**
- `location`: `Identifier | ExportSpecifier`

**Returns:** `Symbol | undefined`
sourceraw docstring

export-symbol-of-symbolcljs

(export-symbol-of-symbol type-checker symbol)

If a symbol is a local symbol with an associated exported symbol, returns the exported symbol. Otherwise returns its input. For example, at export type T = number;: - getSymbolAtLocation at the location T will return the exported symbol for T. - But the result of getSymbolsInScope will contain the local symbol for T, not the exported symbol. - Calling getExportSymbolOfSymbol on that local symbol will return the exported symbol.

Parameters:

  • symbol: Symbol

Returns: Symbol

If a symbol is a local symbol with an associated exported symbol, returns the exported symbol.
Otherwise returns its input.
For example, at `export type T = number;`:
    - `getSymbolAtLocation` at the location `T` will return the exported symbol for `T`.
    - But the result of `getSymbolsInScope` will contain the *local* symbol for `T`, not the exported symbol.
    - Calling `getExportSymbolOfSymbol` on that local symbol will return the exported symbol.

**Parameters:**
- `symbol`: `Symbol`

**Returns:** `Symbol`
sourceraw docstring

exports-of-modulecljs

(exports-of-module type-checker module-symbol)

Parameters:

  • module-symbol: Symbol

Returns: Symbol[]

**Parameters:**
- `module-symbol`: `Symbol`

**Returns:** `Symbol[]`
sourceraw docstring

false-typecljs

(false-type type-checker)

Returns: Type

**Returns:** `Type`
sourceraw docstring

fully-qualified-namecljs

(fully-qualified-name type-checker symbol)

Parameters:

  • symbol: Symbol

Returns: string

**Parameters:**
- `symbol`: `Symbol`

**Returns:** `string`
sourceraw docstring

immediate-aliased-symbolcljs

(immediate-aliased-symbol type-checker symbol)

Follow a single alias to get the immediately aliased symbol.

Parameters:

  • symbol: Symbol

Returns: Symbol | undefined

Follow a *single* alias to get the immediately aliased symbol.

**Parameters:**
- `symbol`: `Symbol`

**Returns:** `Symbol | undefined`
sourceraw docstring

implementation-of-overload?cljs

(implementation-of-overload? type-checker node)

Parameters:

  • node: SignatureDeclaration

Returns: boolean | undefined

**Parameters:**
- `node`: `SignatureDeclaration`

**Returns:** `boolean | undefined`
sourceraw docstring

index-info-of-typecljs

(index-info-of-type type-checker type kind)

Parameters:

  • type: Type
  • kind: IndexKind

Returns: IndexInfo | undefined

**Parameters:**
- `type`: `Type`
- `kind`: `IndexKind`

**Returns:** `IndexInfo | undefined`
sourceraw docstring

index-info-to-index-signature-declarationcljs

(index-info-to-index-signature-declaration type-checker index-info)
(index-info-to-index-signature-declaration type-checker
                                           index-info
                                           enclosing-declaration)
(index-info-to-index-signature-declaration type-checker
                                           index-info
                                           enclosing-declaration
                                           flags)

Note that the resulting nodes cannot be checked.

Parameters:

  • index-info: IndexInfo
  • enclosing-declaration: Node | undefined
  • flags: NodeBuilderFlags | undefined

Returns: IndexSignatureDeclaration | undefined

Note that the resulting nodes cannot be checked.

**Parameters:**
- `index-info`: `IndexInfo`
- `enclosing-declaration`: `Node | undefined`
- `flags`: `NodeBuilderFlags | undefined`

**Returns:** `IndexSignatureDeclaration | undefined`
sourceraw docstring

index-infos-of-index-symbolcljs

(index-infos-of-index-symbol type-checker)

Returns: (indexSymbol: Symbol) => IndexInfo[]

**Returns:** `(indexSymbol: Symbol) => IndexInfo[]`
sourceraw docstring

index-infos-of-typecljs

(index-infos-of-type type-checker type)

Parameters:

  • type: Type

Returns: readonly IndexInfo[]

**Parameters:**
- `type`: `Type`

**Returns:** `readonly IndexInfo[]`
sourceraw docstring

index-type-of-typecljs

(index-type-of-type type-checker type kind)

Parameters:

  • type: Type
  • kind: IndexKind

Returns: Type | undefined

**Parameters:**
- `type`: `Type`
- `kind`: `IndexKind`

**Returns:** `Type | undefined`
sourceraw docstring

jsx-intrinsic-tag-names-atcljs

(jsx-intrinsic-tag-names-at type-checker location)

Parameters:

  • location: Node

Returns: Symbol[]

**Parameters:**
- `location`: `Node`

**Returns:** `Symbol[]`
sourceraw docstring

merged-symbolcljs

(merged-symbol type-checker symbol)

Parameters:

  • symbol: Symbol

Returns: Symbol

**Parameters:**
- `symbol`: `Symbol`

**Returns:** `Symbol`
sourceraw docstring

never-typecljs

(never-type type-checker)

Gets the intrinsic never type. There are multiple types that act as never used internally in the compiler, so the type returned by this function should not be used in equality checks to determine if another type is never. Instead, use type.flags & TypeFlags.Never.

Returns: Type

Gets the intrinsic `never` type. There are multiple types that act as `never` used internally in the compiler,
so the type returned by this function should not be used in equality checks to determine if another type
is `never`. Instead, use `type.flags & TypeFlags.Never`.

**Returns:** `Type`
sourceraw docstring

non-nullable-typecljs

(non-nullable-type type-checker type)

Parameters:

  • type: Type

Returns: Type

**Parameters:**
- `type`: `Type`

**Returns:** `Type`
sourceraw docstring

null-typecljs

(null-type type-checker)

Gets the intrinsic null type. There are multiple types that act as null used internally in the compiler, so the type returned by this function should not be used in equality checks to determine if another type is null. Instead, use type.flags & TypeFlags.Null.

Returns: Type

Gets the intrinsic `null` type. There are multiple types that act as `null` used internally in the compiler,
so the type returned by this function should not be used in equality checks to determine if another type
is `null`. Instead, use `type.flags & TypeFlags.Null`.

**Returns:** `Type`
sourceraw docstring

nullable-typecljs

(nullable-type type-checker type flags)

Parameters:

  • type: Type
  • flags: TypeFlags

Returns: Type

**Parameters:**
- `type`: `Type`
- `flags`: `TypeFlags`

**Returns:** `Type`
sourceraw docstring

number-literal-typecljs

(number-literal-type type-checker value)

Parameters:

  • value: number

Returns: NumberLiteralType

**Parameters:**
- `value`: `number`

**Returns:** `NumberLiteralType`
sourceraw docstring

number-typecljs

(number-type type-checker)

Returns: Type

**Returns:** `Type`
sourceraw docstring

optional-parameter?cljs

(optional-parameter? type-checker node)

Parameters:

  • node: ParameterDeclaration

Returns: boolean

**Parameters:**
- `node`: `ParameterDeclaration`

**Returns:** `boolean`
sourceraw docstring

private-identifier-property-of-typecljs

(private-identifier-property-of-type type-checker left-type name location)

Parameters:

  • left-type: Type
  • name: string
  • location: Node

Returns: Symbol | undefined

**Parameters:**
- `left-type`: `Type`
- `name`: `string`
- `location`: `Node`

**Returns:** `Symbol | undefined`
sourceraw docstring

properties-of-typecljs

(properties-of-type type-checker type)

Parameters:

  • type: Type

Returns: Symbol[]

**Parameters:**
- `type`: `Type`

**Returns:** `Symbol[]`
sourceraw docstring

property-of-typecljs

(property-of-type type-checker type property-name)

Parameters:

  • type: Type
  • property-name: string

Returns: Symbol | undefined

**Parameters:**
- `type`: `Type`
- `property-name`: `string`

**Returns:** `Symbol | undefined`
sourceraw docstring

property-symbol-of-destructuring-assignmentcljs

(property-symbol-of-destructuring-assignment type-checker location)

Parameters:

  • location: Identifier

Returns: Symbol | undefined

**Parameters:**
- `location`: `Identifier`

**Returns:** `Symbol | undefined`
sourceraw docstring

resolve-namecljs

(resolve-name type-checker name)
(resolve-name type-checker name location)
(resolve-name type-checker name location meaning)
(resolve-name type-checker name location meaning exclude-globals?)

Parameters:

  • name: string
  • location: Node | undefined
  • meaning: SymbolFlags
  • exclude-globals?: boolean

Returns: Symbol | undefined

**Parameters:**
- `name`: `string`
- `location`: `Node | undefined`
- `meaning`: `SymbolFlags`
- `exclude-globals?`: `boolean`

**Returns:** `Symbol | undefined`
sourceraw docstring

resolved-signaturecljs

(resolved-signature type-checker node)
(resolved-signature type-checker node candidates-out-array)
(resolved-signature type-checker node candidates-out-array argument-count)

returns unknownSignature in the case of an error. returns undefined if the node is not valid.

Parameters:

  • node: CallLikeExpression
  • candidates-out-array: Signature[] | undefined
  • argument-count: number | undefined - Apparent number of arguments, passed in case of a possibly incomplete call. This should come from an ArgumentListInfo. See signatureHelp.ts.

Returns: Signature | undefined

returns unknownSignature in the case of an error.
returns undefined if the node is not valid.

**Parameters:**
- `node`: `CallLikeExpression`
- `candidates-out-array`: `Signature[] | undefined`
- `argument-count`: `number | undefined` - Apparent number of arguments, passed in case of a possibly incomplete call. This should come from an ArgumentListInfo. See `signatureHelp.ts`.

**Returns:** `Signature | undefined`
sourceraw docstring

return-type-of-signaturecljs

(return-type-of-signature type-checker signature)

Parameters:

  • signature: Signature

Returns: Type

**Parameters:**
- `signature`: `Signature`

**Returns:** `Type`
sourceraw docstring

root-symbolscljs

(root-symbols type-checker symbol)

Parameters:

  • symbol: Symbol

Returns: readonly Symbol[]

**Parameters:**
- `symbol`: `Symbol`

**Returns:** `readonly Symbol[]`
sourceraw docstring

run-with-cancellation-tokencljs

(run-with-cancellation-token type-checker token cb)

Depending on the operation performed, it may be appropriate to throw away the checker if the cancellation token is triggered. Typically, if it is used for error checking and the operation is cancelled, then it should be discarded, otherwise it is safe to keep.

Parameters:

  • token: CancellationToken
  • cb: (checker: TypeChecker) => T

Returns: T

Depending on the operation performed, it may be appropriate to throw away the checker
if the cancellation token is triggered. Typically, if it is used for error checking
and the operation is cancelled, then it should be discarded, otherwise it is safe to keep.

**Parameters:**
- `token`: `CancellationToken`
- `cb`: `(checker: TypeChecker) => T`

**Returns:** `T`
sourceraw docstring

set-get-index-infos-of-index-symbol!cljs

(set-get-index-infos-of-index-symbol! type-checker value)
source

shorthand-assignment-value-symbolcljs

(shorthand-assignment-value-symbol type-checker)
(shorthand-assignment-value-symbol type-checker location)

The function returns the value (local variable) symbol of an identifier in the short-hand property assignment. This is necessary as an identifier in short-hand property assignment can contains two meaning: property name and property value.

Parameters:

  • location: Node | undefined

Returns: Symbol | undefined

The function returns the value (local variable) symbol of an identifier in the short-hand property assignment.
This is necessary as an identifier in short-hand property assignment can contains two meaning: property name and property value.

**Parameters:**
- `location`: `Node | undefined`

**Returns:** `Symbol | undefined`
sourceraw docstring

signature-from-declarationcljs

(signature-from-declaration type-checker declaration)

Parameters:

  • declaration: SignatureDeclaration

Returns: Signature | undefined

**Parameters:**
- `declaration`: `SignatureDeclaration`

**Returns:** `Signature | undefined`
sourceraw docstring

signature-to-signature-declarationcljs

(signature-to-signature-declaration type-checker signature kind)
(signature-to-signature-declaration type-checker
                                    signature
                                    kind
                                    enclosing-declaration)
(signature-to-signature-declaration type-checker
                                    signature
                                    kind
                                    enclosing-declaration
                                    flags)

Note that the resulting nodes cannot be checked.

Parameters:

  • signature: Signature
  • kind: SyntaxKind
  • enclosing-declaration: Node | undefined
  • flags: NodeBuilderFlags | undefined

Returns: (SignatureDeclaration & { typeArguments?: NodeArray<TypeNode> | undefined; }) | undefined

Note that the resulting nodes cannot be checked.

**Parameters:**
- `signature`: `Signature`
- `kind`: `SyntaxKind`
- `enclosing-declaration`: `Node | undefined`
- `flags`: `NodeBuilderFlags | undefined`

**Returns:** `(SignatureDeclaration & { typeArguments?: NodeArray<TypeNode> | undefined; }) | undefined`
sourceraw docstring

signature-to-stringcljs

(signature-to-string type-checker signature)
(signature-to-string type-checker signature enclosing-declaration)
(signature-to-string type-checker signature enclosing-declaration flags)
(signature-to-string type-checker signature enclosing-declaration flags kind)

Parameters:

  • signature: Signature
  • enclosing-declaration: Node | undefined
  • flags: TypeFormatFlags | undefined
  • kind: SignatureKind | undefined

Returns: string

**Parameters:**
- `signature`: `Signature`
- `enclosing-declaration`: `Node | undefined`
- `flags`: `TypeFormatFlags | undefined`
- `kind`: `SignatureKind | undefined`

**Returns:** `string`
sourceraw docstring

signatures-of-typecljs

(signatures-of-type type-checker type kind)

Parameters:

  • type: Type
  • kind: SignatureKind

Returns: readonly Signature[]

**Parameters:**
- `type`: `Type`
- `kind`: `SignatureKind`

**Returns:** `readonly Signature[]`
sourceraw docstring

string-literal-typecljs

(string-literal-type type-checker value)

Parameters:

  • value: string

Returns: StringLiteralType

**Parameters:**
- `value`: `string`

**Returns:** `StringLiteralType`
sourceraw docstring

string-typecljs

(string-type type-checker)

Returns: Type

**Returns:** `Type`
sourceraw docstring

symbol-at-locationcljs

(symbol-at-location type-checker node)

Parameters:

  • node: Node

Returns: Symbol | undefined

**Parameters:**
- `node`: `Node`

**Returns:** `Symbol | undefined`
sourceraw docstring

symbol-of-expandocljs

(symbol-of-expando type-checker node allow-declaration?)

Parameters:

  • node: Node
  • allow-declaration?: boolean

Returns: Symbol | undefined

**Parameters:**
- `node`: `Node`
- `allow-declaration?`: `boolean`

**Returns:** `Symbol | undefined`
sourceraw docstring

symbol-to-entity-namecljs

(symbol-to-entity-name type-checker symbol meaning)
(symbol-to-entity-name type-checker symbol meaning enclosing-declaration)
(symbol-to-entity-name type-checker symbol meaning enclosing-declaration flags)

Note that the resulting nodes cannot be checked.

Parameters:

  • symbol: Symbol
  • meaning: SymbolFlags
  • enclosing-declaration: Node | undefined
  • flags: NodeBuilderFlags | undefined

Returns: EntityName | undefined

Note that the resulting nodes cannot be checked.

**Parameters:**
- `symbol`: `Symbol`
- `meaning`: `SymbolFlags`
- `enclosing-declaration`: `Node | undefined`
- `flags`: `NodeBuilderFlags | undefined`

**Returns:** `EntityName | undefined`
sourceraw docstring

symbol-to-expressioncljs

(symbol-to-expression type-checker symbol meaning)
(symbol-to-expression type-checker symbol meaning enclosing-declaration)
(symbol-to-expression type-checker symbol meaning enclosing-declaration flags)

Note that the resulting nodes cannot be checked.

Parameters:

  • symbol: Symbol
  • meaning: SymbolFlags
  • enclosing-declaration: Node | undefined
  • flags: NodeBuilderFlags | undefined

Returns: Expression | undefined

Note that the resulting nodes cannot be checked.

**Parameters:**
- `symbol`: `Symbol`
- `meaning`: `SymbolFlags`
- `enclosing-declaration`: `Node | undefined`
- `flags`: `NodeBuilderFlags | undefined`

**Returns:** `Expression | undefined`
sourceraw docstring

symbol-to-parameter-declarationcljs

(symbol-to-parameter-declaration type-checker symbol)
(symbol-to-parameter-declaration type-checker symbol enclosing-declaration)
(symbol-to-parameter-declaration type-checker
                                 symbol
                                 enclosing-declaration
                                 flags)

Note that the resulting nodes cannot be checked.

Parameters:

  • symbol: Symbol
  • enclosing-declaration: Node | undefined
  • flags: NodeBuilderFlags | undefined

Returns: ParameterDeclaration | undefined

Note that the resulting nodes cannot be checked.

**Parameters:**
- `symbol`: `Symbol`
- `enclosing-declaration`: `Node | undefined`
- `flags`: `NodeBuilderFlags | undefined`

**Returns:** `ParameterDeclaration | undefined`
sourceraw docstring

symbol-to-stringcljs

(symbol-to-string type-checker symbol)
(symbol-to-string type-checker symbol enclosing-declaration)
(symbol-to-string type-checker symbol enclosing-declaration meaning)
(symbol-to-string type-checker symbol enclosing-declaration meaning flags)

Parameters:

  • symbol: Symbol
  • enclosing-declaration: Node | undefined
  • meaning: SymbolFlags | undefined
  • flags: SymbolFormatFlags | undefined

Returns: string

**Parameters:**
- `symbol`: `Symbol`
- `enclosing-declaration`: `Node | undefined`
- `meaning`: `SymbolFlags | undefined`
- `flags`: `SymbolFormatFlags | undefined`

**Returns:** `string`
sourceraw docstring

symbol-to-type-parameter-declarationscljs

(symbol-to-type-parameter-declarations type-checker symbol)
(symbol-to-type-parameter-declarations type-checker
                                       symbol
                                       enclosing-declaration)
(symbol-to-type-parameter-declarations type-checker
                                       symbol
                                       enclosing-declaration
                                       flags)

Note that the resulting nodes cannot be checked.

Parameters:

  • symbol: Symbol
  • enclosing-declaration: Node | undefined
  • flags: NodeBuilderFlags | undefined

Returns: NodeArray<TypeParameterDeclaration> | undefined

Note that the resulting nodes cannot be checked.

**Parameters:**
- `symbol`: `Symbol`
- `enclosing-declaration`: `Node | undefined`
- `flags`: `NodeBuilderFlags | undefined`

**Returns:** `NodeArray<TypeParameterDeclaration> | undefined`
sourceraw docstring

symbols-in-scopecljs

(symbols-in-scope type-checker location meaning)

Parameters:

  • location: Node
  • meaning: SymbolFlags

Returns: Symbol[]

**Parameters:**
- `location`: `Node`
- `meaning`: `SymbolFlags`

**Returns:** `Symbol[]`
sourceraw docstring

symbols-of-parameter-property-declarationcljs

(symbols-of-parameter-property-declaration type-checker
                                           parameter
                                           parameter-name)

Parameters:

  • parameter: ParameterDeclaration
  • parameter-name: string

Returns: Symbol[]

**Parameters:**
- `parameter`: `ParameterDeclaration`
- `parameter-name`: `string`

**Returns:** `Symbol[]`
sourceraw docstring

true-typecljs

(true-type type-checker)

Returns: Type

**Returns:** `Type`
sourceraw docstring

try-get-member-in-module-exportscljs

(try-get-member-in-module-exports type-checker member-name module-symbol)

Parameters:

  • member-name: string
  • module-symbol: Symbol

Returns: Symbol | undefined

**Parameters:**
- `member-name`: `string`
- `module-symbol`: `Symbol`

**Returns:** `Symbol | undefined`
sourceraw docstring

tuple-type?cljs

(tuple-type? type-checker type)

True if this type is a tuple type. This function will not return true if passed a type which extends from a tuple.

Parameters:

  • type: Type

Returns: boolean

True if this type is a tuple type. This function will _not_ return true if
passed a type which extends from a tuple.

**Parameters:**
- `type`: `Type`

**Returns:** `boolean`
sourceraw docstring

type-argumentscljs

(type-arguments type-checker type)

Parameters:

  • type: TypeReference

Returns: readonly Type[]

**Parameters:**
- `type`: `TypeReference`

**Returns:** `readonly Type[]`
sourceraw docstring

type-assignable-to?cljs

(type-assignable-to? type-checker source target)

Returns true if the "source" type is assignable to the "target" type.

declare const abcLiteral: ts.Type; // Type of "abc"
declare const stringType: ts.Type; // Type of string

isTypeAssignableTo(abcLiteral, abcLiteral); // true; "abc" is assignable to "abc"
isTypeAssignableTo(abcLiteral, stringType); // true; "abc" is assignable to string
isTypeAssignableTo(stringType, abcLiteral); // false; string is not assignable to "abc"
isTypeAssignableTo(stringType, stringType); // true; string is assignable to string

Parameters:

  • source: Type
  • target: Type

Returns: boolean

Returns true if the "source" type is assignable to the "target" type.

```ts
declare const abcLiteral: ts.Type; // Type of "abc"
declare const stringType: ts.Type; // Type of string

isTypeAssignableTo(abcLiteral, abcLiteral); // true; "abc" is assignable to "abc"
isTypeAssignableTo(abcLiteral, stringType); // true; "abc" is assignable to string
isTypeAssignableTo(stringType, abcLiteral); // false; string is not assignable to "abc"
isTypeAssignableTo(stringType, stringType); // true; string is assignable to string
```

**Parameters:**
- `source`: `Type`
- `target`: `Type`

**Returns:** `boolean`
sourceraw docstring

type-at-locationcljs

(type-at-location type-checker node)

Parameters:

  • node: Node

Returns: Type

**Parameters:**
- `node`: `Node`

**Returns:** `Type`
sourceraw docstring

type-from-type-nodecljs

(type-from-type-node type-checker node)

Parameters:

  • node: TypeNode

Returns: Type

**Parameters:**
- `node`: `TypeNode`

**Returns:** `Type`
sourceraw docstring

type-of-assignment-patterncljs

(type-of-assignment-pattern type-checker pattern)

Parameters:

  • pattern: AssignmentPattern

Returns: Type

**Parameters:**
- `pattern`: `AssignmentPattern`

**Returns:** `Type`
sourceraw docstring

type-of-symbolcljs

(type-of-symbol type-checker symbol)

Parameters:

  • symbol: Symbol

Returns: Type

**Parameters:**
- `symbol`: `Symbol`

**Returns:** `Type`
sourceraw docstring

type-of-symbol-at-locationcljs

(type-of-symbol-at-location type-checker symbol node)

Parameters:

  • symbol: Symbol
  • node: Node

Returns: Type

**Parameters:**
- `symbol`: `Symbol`
- `node`: `Node`

**Returns:** `Type`
sourceraw docstring

type-parameter-to-declarationcljs

(type-parameter-to-declaration type-checker parameter)
(type-parameter-to-declaration type-checker parameter enclosing-declaration)
(type-parameter-to-declaration type-checker
                               parameter
                               enclosing-declaration
                               flags)

Note that the resulting nodes cannot be checked.

Parameters:

  • parameter: TypeParameter
  • enclosing-declaration: Node | undefined
  • flags: NodeBuilderFlags | undefined

Returns: TypeParameterDeclaration | undefined

Note that the resulting nodes cannot be checked.

**Parameters:**
- `parameter`: `TypeParameter`
- `enclosing-declaration`: `Node | undefined`
- `flags`: `NodeBuilderFlags | undefined`

**Returns:** `TypeParameterDeclaration | undefined`
sourceraw docstring

type-predicate-of-signaturecljs

(type-predicate-of-signature type-checker signature)

Parameters:

  • signature: Signature

Returns: TypePredicate | undefined

**Parameters:**
- `signature`: `Signature`

**Returns:** `TypePredicate | undefined`
sourceraw docstring

type-predicate-to-stringcljs

(type-predicate-to-string type-checker predicate)
(type-predicate-to-string type-checker predicate enclosing-declaration)
(type-predicate-to-string type-checker predicate enclosing-declaration flags)

Parameters:

  • predicate: TypePredicate
  • enclosing-declaration: Node | undefined
  • flags: TypeFormatFlags | undefined

Returns: string

**Parameters:**
- `predicate`: `TypePredicate`
- `enclosing-declaration`: `Node | undefined`
- `flags`: `TypeFormatFlags | undefined`

**Returns:** `string`
sourceraw docstring

type-to-stringcljs

(type-to-string type-checker type)
(type-to-string type-checker type enclosing-declaration)
(type-to-string type-checker type enclosing-declaration flags)

Parameters:

  • type: Type
  • enclosing-declaration: Node | undefined
  • flags: TypeFormatFlags | undefined

Returns: string

**Parameters:**
- `type`: `Type`
- `enclosing-declaration`: `Node | undefined`
- `flags`: `TypeFormatFlags | undefined`

**Returns:** `string`
sourceraw docstring

type-to-type-nodecljs

(type-to-type-node type-checker type)
(type-to-type-node type-checker type enclosing-declaration)
(type-to-type-node type-checker type enclosing-declaration flags)

Note that the resulting nodes cannot be checked.

Parameters:

  • type: Type
  • enclosing-declaration: Node | undefined
  • flags: NodeBuilderFlags | undefined

Returns: TypeNode | undefined

Note that the resulting nodes cannot be checked.

**Parameters:**
- `type`: `Type`
- `enclosing-declaration`: `Node | undefined`
- `flags`: `NodeBuilderFlags | undefined`

**Returns:** `TypeNode | undefined`
sourceraw docstring

undefined-symbol?cljs

(undefined-symbol? type-checker symbol)

Parameters:

  • symbol: Symbol

Returns: boolean

**Parameters:**
- `symbol`: `Symbol`

**Returns:** `boolean`
sourceraw docstring

undefined-typecljs

(undefined-type type-checker)

Gets the intrinsic undefined type. There are multiple types that act as undefined used internally in the compiler depending on compiler options, so the type returned by this function should not be used in equality checks to determine if another type is undefined. Instead, use type.flags & TypeFlags.Undefined.

Returns: Type

Gets the intrinsic `undefined` type. There are multiple types that act as `undefined` used internally in the compiler
depending on compiler options, so the type returned by this function should not be used in equality checks to determine
if another type is `undefined`. Instead, use `type.flags & TypeFlags.Undefined`.

**Returns:** `Type`
sourceraw docstring

unknown-symbol?cljs

(unknown-symbol? type-checker symbol)

Parameters:

  • symbol: Symbol

Returns: boolean

**Parameters:**
- `symbol`: `Symbol`

**Returns:** `boolean`
sourceraw docstring

valid-property-access?cljs

(valid-property-access? type-checker node property-name)

Parameters:

  • node: PropertyAccessExpression | QualifiedName | ImportTypeNode
  • property-name: string

Returns: boolean

**Parameters:**
- `node`: `PropertyAccessExpression | QualifiedName | ImportTypeNode`
- `property-name`: `string`

**Returns:** `boolean`
sourceraw docstring

void-typecljs

(void-type type-checker)

Returns: Type

**Returns:** `Type`
sourceraw docstring

widened-typecljs

(widened-type type-checker type)

Parameters:

  • type: Type

Returns: Type

**Parameters:**
- `type`: `Type`

**Returns:** `Type`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close