Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Provide feedback

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

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

import type cannot be used on classes? #36040

Closed
Assignees
andrewbranch
Labels
BugA bug in TypeScriptFix AvailableA PR has been opened for this issue
@Tyriar

Description

@Tyriar

I was excited when I heard aboutimport type as I've been using dynamic imports on a component to save start up time in vscode for some time, however it's very fragile as I only want to import types and not implementation.

When I try to put theimport type guard in place I get the following error though:

image

What's happening here is I'm wanting to import anexport class definition and only reference it as a type by getting its constructor withtypeof. However I'm getting an error that it's being used as a value inside a: type definition?

Terminal definition:https://github.com/xtermjs/xterm.js/blob/1c06e576aea6b1a63dc71d180ae92cc1c6d68c7c/typings/xterm.d.ts#L385
Above usage:https://github.com/microsoft/vscode/blob/81fb34c445098d43d0f25b4e1868ca421022d4de/src/vs/workbench/contrib/terminal/browser/terminalInstanceService.ts#L8-L16

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp