Skip to content

Missing Type Information #28467

@RebeccaStevens

Description

@RebeccaStevens

Some functions exported by typescript are missing from the type definition file (typescript.d.ts).
For example, the function isAssignmentExpression is missing.

https://github.com/Microsoft/TypeScript/blob/a2205ad53d8f65a129a552b752d1e06fee3d41fc/src/compiler/utilities.ts#L3865-L3873

(The function exists in lib/typescript.js, but not in lib/typescript.d.ts)

TypeScript Version: 3.2.0-dev.201xxxxx

Search Terms:
Missing Type Information
isAssignmentExpression
typescript.d.ts

Code

import * as ts from "typescript";

function test(node: ts.Node): boolean {
  return ts.isAssignmentExpression(node);
}

Expected behavior:

The definitions for isAssignmentExpression (and the other missing functions) are included in typescript.d.ts

Actual behavior:

The definitions for isAssignmentExpression (and the other missing functions) are not included in typescript.d.ts

Playground Link:
http://www.typescriptlang.org/play/#src=import%20*%20as%20ts%20from%20%22typescript%22%3B%0D%0A%0D%0Afunction%20test(node%3A%20ts.Node)%3A%20boolean%20%7B%0D%0A%20%20return%20ts.isAssignmentExpression(node)%3B%0D%0A%7D

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: APIRelates to the public API for TypeScriptWorking as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions