Vscode-react-native: Salsa Doesn't Provide Intellisense When Using Import Statements

Created on 19 Feb 2016  路  6Comments  路  Source: microsoft/vscode-react-native

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

known-issues

All 6 comments

Thanks for keeping us looped in! :+1:

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

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 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 Awesome. Thanks! Installing now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bugproof picture bugproof  路  5Comments

dimitarnestorov picture dimitarnestorov  路  4Comments

SounD120 picture SounD120  路  4Comments

vsccarl picture vsccarl  路  3Comments

yuki2006 picture yuki2006  路  5Comments