JSPM

  • Created
  • Published
  • Downloads 131
  • Score
    100M100P100Q78035F
  • License MIT

high level TypeScript Compiler API and refactor tools based on ts-morph (ex ts-simple-ast) librart

Package Exports

  • ts-simple-ast-extra

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ts-simple-ast-extra) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ts-simple-ast-extra

  • extra utilities for ts-simple-ast that make sense on my plugins, like abstract types, test helpers, utilities, etc

  • while typescript-ast-util and typescript-plugin-util must remain independent on any library - this is very dependant on ts-simple-ast.

  • Lots of code refactors.

API docs

See apidocs

TODO

  • build "Incremental build support using the language services" from https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API so we can debug the whole experience in debugger instead of debugging using plugin manually in the editor!

  • INVESTIGATE THIS TO MOVE CLASSES: https://basarat.gitbooks.io/typescript/docs/types/moving-types.html Copying both the Type + Value If you want to move a class around, you might be tempted to do the following: class Foo { } var Bar = Foo; var bar: Bar; // ERROR: cannot find name 'Bar' This is an error because var only copied the Foo into the variable declaration space and you therefore cannot use Bar as a type annotation. The proper way is to use the import keyword. Note that you can only use the import keyword in such a way if you are using namespaces or modules (more on these later): namespace importing { export class Foo { } }

import Bar = importing.Foo; var bar: Bar; // Okay This import trick only works for things that are both type and variable.