Skip to content

Instantly share code, notes, and snippets.

@agconti
Created May 4, 2016 13:47
Show Gist options
  • Save agconti/a00570cc9335811005ca5e8d4464dd8e to your computer and use it in GitHub Desktop.
Save agconti/a00570cc9335811005ca5e8d4464dd8e to your computer and use it in GitHub Desktop.
How to reference packages installed with jspm with when TypeScript and Atom

Problem

Packages installed with jspm can't be found when trying to import them using TypeScript with Atom.

Soultion

Update your tsconfig.json to use the "filesGlob" property. This specifies all the files that Atom TypeScript should look at for import. By default Atom only looks at pacakges installed in node_modules.

{
"compilerOptions": {
"target": "ES5",
"module": "system",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false
},
"filesGlob": [
"./**/*.ts",
"!./node_modules/**/*.ts",
"!./jspm_modules/**/*.ts"
],
"exclude": [
"node_modules"
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment