vscode-react-native icon indicating copy to clipboard operation
vscode-react-native copied to clipboard

Salsa Doesn't Provide Intellisense When Using Import Statements

Open joshuaskelton opened this issue 10 years ago • 6 comments

Salsa IntelliSense does not work when using ES6 style import statments. I've tried tweaking some tsconfig.json settings, but without much luck.

This does not work: import React, { AppRegistry } from 'react-native';

But this does: var React = require('react-native'); var { AppRegistry } = React;

This is a known TypeScript issue: https://github.com/Microsoft/TypeScript/issues/7000

joshuaskelton avatar Feb 18 '16 23:02 joshuaskelton

Fix is out for review. See https://github.com/Microsoft/TypeScript/pull/7249#issuecomment-190297728

billti avatar Feb 29 '16 17:02 billti

Thanks for keeping us looped in! :+1:

joshuaskelton avatar Feb 29 '16 17:02 joshuaskelton

Looks like the change was merged. I'll verify once we get the typescript bits.

joshuaskelton avatar Mar 10 '16 21:03 joshuaskelton

Any update on when this fix will be pushed out? Negates one of the most awesome features of VSCode, at least for my current project.

zchrykng avatar Mar 20 '16 19:03 zchrykng

@zchrykng The fix is available in the latest VS Code insiders build. Pls see https://code.visualstudio.com/blogs/2016/02/01/introducing_insiders_build

You need to enable "allowSyntheticDefaultImports". This is the jsconfig.json:

jsconfig.json

 {
    "compilerOptions": {
        "allowSyntheticDefaultImports": true
    }
}

image

egamma avatar Mar 22 '16 11:03 egamma

@egamma Awesome. Thanks! Installing now.

zchrykng avatar Mar 22 '16 16:03 zchrykng