SharpDevelop 4.3.1 now has support for TypeScript with an early beta release of a new Addin.
- TypeScript compilation on save or build.
- Code folding.
- Code completion
- Find references
- Rename refactoring
- Go to definition
- Quick class browser support.
- TypeScript syntax highlighting
The addin supports:
- SharpDevelop 4.3.1
- TypeScript 0.8.3.1
Let us take a quick look at some of these features.
Code completion works when you press the dot character.
Code completion also works when you type the first bracket of a function.
Find References, Go to Definition and Rename
These menu options can be found by right clicking on a class or a class member.
Go To TypeScript Definition will show the corresponding type definition. Find TypeScript References will show the reference locations in the Output window. Rename will open a dialog box where you can type in the new name and click OK to have it updated everywhere it is referenced.
Getting the Addin
The addin's source code is available on GitHub. A zip file is available to download containing the pre-compiled addin. Simply unzip the files and install into SharpDevelop using the Addin Manager. The Addin Manager is available by selecting Addin Manager from the Tools menu. Install the addin by clicking the Install Addin button and then restart SharpDevelop.
Configuring TypeScript Compiler Options
Limitations and Known Issues
- Limitation with multiple projects using TypeScript files in the same solution. All files are included in the same scope.
- Performance problems - currently doing work on the UI thread and also re-parsing all TypeScript files each time when a code completion action is triggered.
- Different behaviour to Visual Studio with classes show in the code completion window. Visual Studio only shows code completion for TypeScript files you have explicitly referenced in a comment. SharpDevelop shows everything in the current project.
- Unable to easily replace the existing SharpDevelop menu options such as Find References so the standard shortcuts will not work.
- No support for hovering over a type with the mouse and seeing a tooltip with information about the type.