← 返回首页
Codebase Compiler FAQ · microsoft/TypeScript Wiki · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Codebase Compiler FAQ

Nathan Shively-Sanders edited this page Sep 2, 2022 · 1 revision

Frequently Asked Questions

How can I find out if a type is number[]?

getElementTypeOfArrayType(t) === numberType

getElementTypeOfArrayType returns undefined if t is not an array type. Use isArrayType or isArrayLikeType if that's all you need to know.

How can I delete nodes in a transformer?

Probably you return undefined instead of a new or existin node, but look at src/compiler/transformers/ts.ts. Deleting type annotations is its main job.

Toggle table of contents Pages 78

Clone this wiki locally

Footer

© 2026 GitHub, Inc.