Skip to content

Inconsistent use of import()-type in signature help #24848

Description

@ajafff

TypeScript Version: 3.0.0-dev.20180609

Search Terms: import type

Code

import {getWrappedNodeAtPosition} from 'tsutils';
getWrappedNodeAtPosition(/*1*/

Expected behavior:

Expected the following signature help, because it used to to show that in previous versions.

getWrappedNodeAtPosition(wrap: NodeWrap, pos: number): NodeWrap | undefined

Otherwise I would expect the use of the import()-type to be consistent and to also be used in the return type.

Actual behavior:

After typing the opening paren (at /*1*/), the following signature help is shown:

getWrappedNodeAtPosition(wrap: import("/Users/klaus/code/wotan/node_modules/tsutils/util/convert-ast").NodeWrap, pos: number): NodeWrap | undefined

Playground Link:

Related Issues:

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions