Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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