Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Import syntax matters #36

Open
TylerLeonhardt opened this issue May 4, 2022 · 1 comment
Open

Import syntax matters #36

TylerLeonhardt opened this issue May 4, 2022 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@TylerLeonhardt
Copy link
Member

From my testing, the import syntax used had to be in the form:

import * as nls from 'vscode-nls';

and the following wasn't picked up:

import { loadMessageBundle } from 'vscode-nls';
@TylerLeonhardt TylerLeonhardt self-assigned this May 4, 2022
@TylerLeonhardt TylerLeonhardt added the bug Issue identified by VS Code Team member as probable bug label May 4, 2022
@TylerLeonhardt TylerLeonhardt added this to the Backlog milestone May 4, 2022
@dbaeumer
Copy link
Member

dbaeumer commented May 5, 2022

That is correct and for simplicity. Major reason is that we would need to have fully correct code to make sure that we have all symbol bindings in the TS compiler to make the right decisions. Someone could for example write

import { loadMessageBundle  as myFunctionName } from 'vscode-nls';

We also don't support things like

const myFunctionName = loadMessageBundle;

for the same reason.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants