Skip to content
This repository has been archived by the owner on Sep 18, 2019. It is now read-only.

๐Ÿ Demonstration a type inference problem in TSServer.

License

Notifications You must be signed in to change notification settings

kurone-kito/typescript-inference-problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ typescript-inference-problem

Demonstration a type inference problem in TSServer.

Usage

npm ci
npm start # node_modules/.bin/tsserver < commands.json

Source

interface Params {
  foo: string | undefined;
}

export default (params: Params) => params.foo;
//     ^---- quickinfo here

Expected

// ...(omitted)
"displayString": "(property) default: (params: Params) => string | undefined"
// ...(omitted)

Got

// ...(omitted)
"displayString": "(property) default: (params: Params) => string"
// ...(omitted)

Releases

No releases published

Packages

No packages published