Skip to content

Instantly share code, notes, and snippets.

@claudioc
Last active August 28, 2018 08:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save claudioc/0e7b1f85eb3449258faf8cb94ea8a2c7 to your computer and use it in GitHub Desktop.
Save claudioc/0e7b1f85eb3449258faf8cb94ea8a2c7 to your computer and use it in GitHub Desktop.
-- Contenuto del tsconfig.json
{
// Enable support for importing CommonJS modules targeting es6 modules
"esModuleInterop": true,
// When using above interop will get missing default export error from type check since
// modules use "export =" instead of "export default", enable this to ignore errors.
"allowSyntheticDefaultImports": true
}
-- Contenuto del file index.ts (nella stessa directory c'è angle-normals.js)
-- (https://raw.githubusercontent.com/mikolalysenko/angle-normals/master/angle-normals.js)
import * as angleNormals from './angle-normals';
// Works
angleNormals();
-- Compilo con
tsc --allowJs --outDir dist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment