GithubHelp home page GithubHelp logo

phaiax / arctictypescript Goto Github PK

View Code? Open in Web Editor NEW
96.0 7.0 8.0 7.85 MB

TS 1.4+: completion, error highlighting, build, snippets, quickinfo, ...

License: MIT License

Python 26.08% JavaScript 72.07% HTML 0.26% CSS 0.50% TypeScript 1.08%

arctictypescript's Introduction

ArcticTypescript

  • Wizzard for project creation (create .ts file to activate).
  • syntax highlighting
  • auto completion
  • live error highlighting
  • fast access to errors via shortcuts and clicks
  • refactoring (beta)
  • jump to declaration
  • quick info
  • build system for Typescript 1.5
  • view build result.js
  • snippets
  • filesGlob support (on_save only)

Errors? See Common Errors and Solutions first, then issue a bug report.

Images of ArcticTypescript

Commands and Shortcuts

Shortcut Action
Ctrl+ Space trigger code completion.
Alt + Shift + E E error view
Alt + Shift + E H jump to 1st error
Alt + Shift + E J jump to 2nd error
Alt + Shift + E K jump to 3rd error
Alt + Shift + E L jump to 4th error
F1 show details about type under cursor
F2 refactor under cursor
(beta: enable in settings first)
F4 jump to declaration
F8 or Ctrl+B Build the project.
Shift+F5 reload (do this if autocompletion
is missing something or after
tsconfig.json changes)
  • Goto Anything -> "ArcticTypescript: Terminate All Builds" if build is stuck
  • snippets: see below

Example Projects

Settings

You need to configure typescript using a tsconfig.json file. Place this file in your project folder or at least in some parent folder of your source files.

Minimal Example tsconfig.json:

{
    "compilerOptions": {
        "out": "out.js",
        "sourceMap": true,
        "target": "es5"
    },
    "files": [
        "main.ts"
    ],
}

"files" : [] : Define the files which should be compiled. At least 1 file is required. You only need to specify the file from the top / root of your internal reference tree (your main.ts). But it does no harm to specify more files. Alternative: use "filesGlob" : [] (see below)

More compilerOptions:

  • target (string) 'es3'|'es5' (default) | 'es6'
  • module (string) 'amd'|'commonjs' (default)
  • declaration (boolean) Generates corresponding .d.ts file
  • out (filepath) Concatenate and emit a single file
  • outDir (folderpath) Redirect output structure to this directory
  • noImplicitAny (boolean) Error on inferred any type
  • removeComments (boolean) Do not emit comments in output
  • sourceMap (boolean) Generates SourceMaps (.map files)
  • removeComments (boolean) Do not emit comments to output.
  • sourceRoot (folder) Optionally specifies the location where debugger should locate TypeScript source files after deployment
  • mapRoot (folder) Optionally Specifies the location where debugger should locate map files after deployment
  • preserveConstEnums (boolean) Do not erase const enum declarations in generated code.
  • suppressImplicitAnyIndexErrors (boolean) Suppress noImplicitAny errors for indexing objects lacking index signatures.

All pathes are relative to tsconfig.json. These are exactly the options for the typescript compiler: Refer to tsc --help.

Decide between:

  • out='outfile.js' : Then use /// <reference path="second.ts" /> to spread your code. Example
  • outDir='built/' and module='amd': Use import s = require('second') to spread your code. Example

filesGlob

Atom-TypeScript provides a feature called filesGlob. ArcticTypescript mimics that feature. Create a filesGlob list next to the files list. Everytime you save tsconfig.json the files will be updated. Example:

{
    "compilerOptions": { },
    "filesGlob": [
        "./**/*.ts",
        "!./node_modules/**/*.ts"
    ]
}

ArcticTypescript settings

You can configure ArcticTypescript as well (type, default):

  • enable_refactoring (boolean, false) Disabled by default (still beta)
  • activate_build_system (boolean, true)
  • auto_complete (boolean, true)
  • node_path (string, null) If null, then nodejs must be in $PATH
  • tsc_path (string, null) If null, it will search a node_modules dir with typescript installed or use ArcticTypescript's tsc
  • error_on_save_only (boolean, false)
  • build_on_save (boolean, false)
  • show_build_file (boolean, false) show the compiled output after build
  • pre_processing_commands ([string], [])
  • post_processing_commands ([string], [])

Where to store these settings:

  • For personal settings across all typescript projects:
    • GUI: Menu -> Preferences -> "Settings - User" -> ['ArcticTypescript'][KEY]. This is the file <sublime config dir>/Packages/User/Preferences.sublime-settings.
    • GUI Menu -> Preferences -> Package Settings -> ArcticTypescript -> "Settings - User" -> [KEY]. This is the file <sublime config dir>/Packages/User/ArcticTypescript.sublime-settings.
  • For personal, project specific settings
    • GUI: Menu -> Project -> "Edit Project" -> ['settings']['ArcticTypescript'][KEY]. This is the file <ProjectSettings>.sublime-settings.
  • If you are not part of a team or for settings for everyone or for project specific settings if you don't have created a sublime project
    • tsconfig.json ['ArcticTypescript'][KEY]

Example Settings in project file mytsproject.sublime-settings:

{
    "folders":
    [
        {
            "file_exclude_patterns": ["*~"],
            "follow_symlinks": true,
            "path": "."
        }
    ],
    "settings":
    {
        "ArcticTypescript": {
            "pre_processing_commands": ["node .settings/.components"]
            "post_processing_commands": [
                "node .settings/.silns.js",
                "r.js.cmd -o .settings/.build.js",
                "cat ${tsconfig}",
                "echo a\\\\nbc | cat"
            ]
        }
    }
}

The working directory for all commands is ${tsconfig_path}. They will be executed using subprocess.Popen(cmd, shell=True). shell=True -> You can use pipes, ...

You can use variables for the string values:

  • Sublime Variables
  • All your compilerOptions, e.g. ${outDir}
  • ${platform} : sys.platform = "linux" | "darwin" | "nt"
  • ${tsconfig} : the path to tsconfig.json
  • ${tsconfig_path} : the folder of tsconfig.json

Snippets

Type <trigger> and press TAB to insert snippet: <trigger>: feature

  • typescriptsnippets : Print this list into file as short reference.
  • .
  • cls : class with constructor
  • ctor : constructor
  • get : public getter
  • set : public setter
  • prop : public getter and setter
  • met : public class method
  • .
  • imp : import a = require('b')
  • ref : /// <reference path="a" />
  • .
  • do : do while loop
  • for : for (…; i++) {…}
  • forl : for (… .length; i++) {…}
  • forb : for (…; i--) {…} backwards loop (faster?)
  • forin: for … in … loop
  • .
  • f : function a(b) {c}
  • r0 : return false;
  • r1 : return true;
  • ret : return a;
  • .
  • ie : if … else …
  • if : if …
  • .
  • log : console.log();
  • to : setTimeout(() => {}, 500);
  • sw : switch … case: … default:
  • thr : throw "";

Installation

You need Sublime Text 3, Package Control for Sublime 3, node.js, and optionally Typescript (ArcticTypescript also provides a compiler).

Install ArcticTypescript: Open Sublime --> Goto Anything --> Package Control: Install Package --> ArcticTypescript

Install the AutoFileName plugin for completion of /// <reference path="xxx" />

Credits

Typescript tools for codecompletion and live errors. I'm using the same error icons as SublimeLinter. I took inspiration from Atom TypeScript.

Notes for Upgraders / People which used T3S before

This is a clone of the Typescript T3S Plugin, but with a lots of changes. If you switch to ArcticTypescript, please:

  • read this readme
  • uninstall T3S
  • delete the *.sublime-workspace files in your projects
  • close all file tabs in your old T3S Projects
  • update your key binding overrides, The new key is 'ArcticTypescript'

Compatibility

Sublime Text 2 is not supported anymore: Use the T3S plugin instead of this one for Sublime Text 2 users.

Build system may not work if you have installed typescript < 1.5 your projects node_modules / package.json. Workaround until typescript 1.5 is installed: Set the dependency in package.json to "typescript": "git+ssh://[email protected]:Microsoft/TypeScript.git".

Important Changes

v0.7.0:

  • Variable replacements for post or pre processing commands now require curly braces: ${tsconfig}
  • Typescript 1.5 beta

v0.6.0:

  • Dropped .sublimets, x.sublime-project. Compiler options belong to tsconfig.json
  • Many internal changes. Report if something is broken.
  • README rewrite
  • ProjectWizzard
  • filesGlob

v0.5.0:

  • You will need a new config file called tsconfig.json
  • Updated to TS 1.5 via typescript-tools (switching to tsserver will come soon)
  • Dropped support for Outline view, since typescript-tools has dropped support for this. This feature will come back again with tsserver.

v0.4.0:

  • build system: (relative) paths with spaces are now enclosed in "" automatically
  • If you used additional "" to workaround the issue, you have to remove them, refer to messages/0.4.0.txt

v0.3.0:

  • relative root files now have a different base directory
  • The default shortcut to switch to the error view changed to: CTRL + ALT + E
  • There are 4 new shortcuts to jump to the first four Errors: CTRL + ALT + E + H (or J, K, L)

arctictypescript's People

Contributors

cellule avatar corbanmailloux avatar ilanfrumer avatar loyd avatar nikeee avatar phaiax avatar railk avatar seanhess avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

arctictypescript's Issues

All commands or features aren't working

OS: Win 7 sp1 64bits
ST3: Build 3065

I can see the syntax coloring on .ts file.

But all the commands or features like: auto completion( it just shows terms in a file ), error highlighting, syntax highlighting, refactoring, etc, aren't working.

Random error started appearing

haven't changed anything, went to sleep, and the other day it wasn't working anymore

ArcticTypescript: error   : typescript-tools error: 
 G:\Dropbox\ST3\Data\Packages\ArcticTypescript\bin\tss.js:190

            seenNoDefaultLib = seenNoDefaultLib || source.hasNoDefaultLib;
                                                         ^

TypeError: Cannot read property 'hasNoDefaultLib' of undefined
    at G:\Dropbox\ST3\Data\Packages\ArcticTypescript\bin\tss.js:190:58
    at Array.forEach (native)
    at TSS.setup (G:\Dropbox\ST3\Data\Packages\ArcticTypescript\bin\tss.js:188:24)
    at Object.<anonymous> (G:\Dropbox\ST3\Data\Packages\ArcticTypescript\bin\tss.js:600:5)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)

Save as dialog pops up constantly if new file is open

If one of my open files is a new (never saved) file, the "Save As" dialog pops up a lot. Some examples of specific times it pops up are when I close a file and sometimes while I'm in the Ctrl+P dialog (seems to happen after I type an "s" in that dialog??). This never happened to me until I configured a project root for autocompletion.

The workaround is to always save new files to a temp directory or something, but it's still quite annoying--I tend to leave one or more new files open at all times as "scratch" space.

Stuck at "Typescript project is initializing".

Error:

Typescript initializing MY_FILESYSTEM\T3STest\main.ts
Exception in thread Thread-3:
Traceback (most recent call last):
  File "./threading.py", line 901, in _bootstrap_inner
  File "MY_FILESYSTEM\AppData\Roaming\Sublime Text 3\Packages\ArcticTypescript\lib\system\Processes.py", line 162, in run
    self.tss_process = Popen([node, tss, self.root], stdin=PIPE, stdout=PIPE, stderr=PIPE, **kwargs)
TypeError: type object got multiple values for keyword argument 'stderr'

Exception in thread Thread-4:
Traceback (most recent call last):
  File "./threading.py", line 901, in _bootstrap_inner
  File "MY_FILESYSTEM\AppData\Roaming\Sublime Text 3\Packages\ArcticTypescript\lib\system\Processes.py", line 162, in run
    self.tss_process = Popen([node, tss, self.root], stdin=PIPE, stdout=PIPE, stderr=PIPE, **kwargs)
TypeError: type object got multiple values for keyword argument 'stderr' 

Can't get sublime-project to work

I'm able to get the subliments file working fine. When I attempt to copy the example for sublime-project, I am given an error that no subliments nor sublime-project has been created.

Thoughts?

F1 and F4 do nothing

I'm having no popup or "go to" when pressing either F1 or F4. I'm on windows 7, with typescript-tools 1.4.4, typescript 1.5.0 installed. Nothing shows up on the console

plugin crash

Hi ...

Sometimes i get this error, popup from sublime :

"plugin_host has exited unexpectedly, plugin functionality won't be available until Sublime Text has been restarted"

Are there anything I can do to clarify what kind of error this is all about ?

"Could not find nodejs" on Mac even though path is set in default settings file

I'm getting the following error on a Mac when setting up a new TypeScript project:

Typescript initializion error for : /Users/me/myproject/tsconfig.json
 >>> Could not find nodejs.
I have tried this path: node
Please install nodejs and/or set node_path in the project or plugin settings to the actual executable.
If you are on windows and just have installed node, you first need to logout and login again.
 ArcticTypescript is disabled until you restart sublime.

This is my default ArcticTypescript.sublime-settings:

{
    "auto_complete" : true,
    "error_on_save_only" : false,
    "activate_build_system" : true,
    "node_path" : "/usr/local/bin/node",
    "tsc_path" : "/Users/me/.node/bin/tsc",
    "build_on_save" : false,
    "pre_processing_commands" : [],
    "post_processing_commands" : [],
    "show_build_file" : false,
}

I'm wondering if the problem is actually that a FileNotFoundException is being thrown because some other file isn't found (I haven't set up a project or workspace file yet).

TSS command processing error when editing a new TS-file

Hello,

I have created a new TS-file in a folder with some already existing ones but the difference is that in this new file the completion doesn't work.

I wasn't doing anything exceptional, just a simple class like

class X {
  val: string;
  constructor(){
    this.*  <---- *at this point the exception gets thrown* 
 }
}

Here's the console output:

completion json error : "TSS command processing error: TypeError: Cannot read property 'lineMap' of undefined"

Regards,
Harris

Plugin messes up granularity of undo

With the plugin enabled, pressing Ctrl+Z for undo only undoes one character at a time, rather than words or other longer sequences, which is pretty annoying. I only noticed this after configuring autocompletion for the first time, but now it seems to happen even when I don't have autocompletion configured. (By "not configured" I mean the project root is set to a nonexistent file.)

Can't find output file after build

I pull one example project to my local space, single_out_file.
I want to try this plugin how to work, so I remove all js files and build it.
The command finished, but I can't find the output file in my folder.

Where is the output file, could you help me in this case?

mac 10.10.2
sublime 3 build 3083

No auto completion and reference file issues in ST3

I don't get any auto completion at all with AT as well as I have reference files for AngularJS and I am using AngularJS declarations in my file.

Compiling with TSC via terminal works fine, but in Sublime, AT complains "could not find symbol 'angular'"

I've tried better typescript, I've tried T3S and I've tried ArcticTypescript and none of them work. I am forced to use OSX at work, so it would be nice to find a decent sublime equivalent to the "it just works" Visual Studio that I use at home.

I can provide screenshots/extra information as necessary.

Stuck on loading screen (Typescript project is initializing [ = ])

I get stuck in the initial loading screen and I get this error on console:

Exception in thread Thread-[Some Number]
    File "./subprocess.py", line 1112, in _execute_child
PremissionError: [WinError 5] Access is denied

I'm running ST3 in Windows 8.1. I tested with Python 2.7 and 3.4, witno node and io.js, and all behave the same way. I tried with a new project, and it gets the same result.

example

error highlighting in gutter

Hi ...

I am very happy for this new TS3 plugin, it works wonders most of the time, but a few things don't seems to work.

The SublimeLinter errors in the gutter provides small symbols when I make an error in the TS code as expected, but I can't get any hint as to what kind of error this is. I have tried all kind of clicking and mouse-over, but it only just end up marking the line for clipboard clipping :-(
When I use a js-lint plugin the gutter icons provide nice descriptions in the status bar, so it is working for other plugins.

The other thing are the alt-shift-e function. It works only if i provide a additional h,k,j,l char afterwards but not as it self, is that supposed to work that way ?

/BL

TODO: unsaved changes on reopen

If you reopen sublime and there are unsaved changes in the already opened files, it will instead use the current disk contents instead of the unsaved changes to compute the errors.

Change keyboard shortcut

I use ctrl + b to move back one character, but ArcticTypescript overrides it for its build command. Is there a way to prevent this?

Plugin doesn't recognize d.ts files (I think)

I'm trying to work with some d.ts files. My file compiles ok with tsc, but the plugin doesn't recognize the definitions. Here's the file:

///<reference path="jquery.d.ts"/>
///<reference path="underscore.d.ts"/>
///<reference path="backbone.d.ts"/>

import Backbone = require("backbone");

class Animal extends Backbone.Model {

    initialize(attributes: any) {
            this.set('name', 'joe');
    }
}

The error is Module cannot be aliased to a non-module type. This is Sublime Text build 3065 on Ubuntu 14.04.

Align multiline var

I'd like the following:

var a = 1,
b = 2,
c = 3;

To be aligned like so:

var a = 1,
    b = 2,
    c = 3;

I am not sure if arctic is doing something for the indentation, but I think arctic should fix it or make it configurable if possible.

'NoneType' object is not subscriptable

I always get this error in the error view, and the error below in the Sublime Console.
What does it mean? The plugin stops working once this error occurs (no autocompletion, no check for errors) until I restart sublime or save tsconfig.json, then it reinitializes. When I build the project it throws no errors :(

ArcticTypescript: error   : Internal ArcticTypescript error during show_errors: "TSS command processing error: Error: Debug Failure. False expression: How could we be trying to update a document that the registry doesn't have?"
 (Exception Message: 'NoneType' object is not subscriptable)

I'm on Windows 8.1

EDIT: Works fine on Mac though with the same codebase.

By the way, I love this Sublime Package, thanks for all the work you put in.
(But this is driving me nuts, cause it makes it unusable)

Build Command Generates no Output (and Proposed Solution)

When executing the build command (Ctrl+B or "Arctic Typescript: Build" from the Sublime Text command menu), the command "succeeds" but generates no output .js files. The Sublime Text console simply shows the following:

>>> ['node', 'C:\Users\JWhite\AppData\Roaming\Sublime Text 3\Packages\ArcticTypescript\bin\node_modules.bin\tsc', '--project', '.']
<<< Finished

After having this issue on my own project, I made a direct copy of one of the example projects on the Arctic Typescript website - examples/using_amd_modules and found the problem persisted when I tried compiling the example code. I also tried reinstalling Node.js (current version - v0.12.2), Sublime Text, and Arctic Typescript, but to no avail. I am using Windows 8 and have npm and the npm typescript-tools package installed.

Running the same build command on the command line gives a possible insight about the problem. The command fails, and we see that somehow the "fail" didn't reach the Sublime Text console. The Node build command expects the given tsc file to be executable code, but instead it is simply a file with the text ../typescript/bin/tsc. Apparently the Node build command expects to find executable code in the tsc file rather than simply a relative path to a file containing executable code. Here's my error message, copied directly from the command line:

C:\Users\JWhite\Documents\Typescript>node "C:\Users\JWhite\AppData\Roaming\Sublime Text 3\Packages\ArcticTypescript\bin\node_modules.bin\tsc" --project .
C:\Users\JWhite\AppData\Roaming\Sublime Text 3\Packages\ArcticTypescript\bin\node_modules.bin\tsc:1
(function (exports, require, module, __filename, __dirname) { ../typescript/bi
^
SyntaxError: Unexpected token .
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3

After belabouring over this problem for many hours, I found a workaround - simply change the command to use the second tsc file instead of trying to get the aforementioned redirect path to compile. The new command compiles on the command line, and it works in the Arctic Typescript Build command as well (note that one must restart Sublime Text before the change will take effect). The nice thing is that even though the above mentioned error did not show up on the Sublime Text console, after making this change, syntax errors during build do appear on the console. Here's the applicable code:

Command line: node "C:\\Users\\JWhite\\AppData\\Roaming\\Sublime Text 3\\Packages\\ArcticTypescript\\bin\\node_modules\\typescript\\bin\\tsc" --project .

Arctic Typescript package: Change ArcticTypescript\lib\utils\pathutils.py, line 93 from return os.path.join(package_path, 'bin', 'node_modules', '.bin', 'tsc') to return os.path.join(package_path, 'bin', 'node_modules', 'typescript', 'bin', 'tsc'). Of course, this is a definition library file that gets referenced in the compile.py file, where the above command is executed.

Could we get this bug fixed? Am I missing anything here? Thanks for all your work on the Arctic Typescript project!

Using Sublime 3 to compile TypeScript gives me an error about Temporary ASP.NET Files directory already exists

Before I begin, thanks for ArcticTypescript! I allows me to work efficiently in Sublime 3 with TypeScript.

Now my issue.

My main application is running via Visual Studio 2013, Windows 8.1 ASP.NET 4.5. I launch my VS web application in debug mode. I am trying to use Sublime as my editor for TypeScript (TS files) and LESS files. I have the package ArcticTypeScript installed in Sublime 3. I believe it compiles TS correctly, EXCEPT for the following error.

ERRORS :
A subdirectory or file C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files already exists.

When I compile TS files, this error just shows up in the build console of Sublime. I can still work, but why is this error happening? This "error" is driving me crazy.

Any ideas why this is happening?

Would this have anything to do with Browserlink running in VisualStudio? Is it possible for me to run some cmd file before the compiles to delete that temporary directory?

Thanks for any help!

Can't build project in ArcticTypescript 0.5.2

The error:

Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 543, in run_
    return self.run(edit, **args)
  File "C:\Users\Daniel Main\AppData\Roaming\Sublime Text 3\Packages\ArcticTypescript\lib\Utils.py", line 89, in catcher
    func(*kargs, **kwargs)
  File "C:\Users\Daniel Main\AppData\Roaming\Sublime Text 3\Packages\ArcticTypescript\lib\Commands.py", line 290, in run
    if not SETTINGS.get('activate_build_system', get_root(filename)):
  File "C:\Users\Daniel Main\AppData\Roaming\Sublime Text 3\Packages\ArcticTypescript\lib\system\Settings.py", line 29, in get
    return self.projects_type[root].get(get_any_view_with_root(root),token)
  File "C:\Users\Daniel Main\AppData\Roaming\Sublime Text 3\Packages\ArcticTypescript\lib\system\Project.py", line 42, in get
    return config_data['settings'][token]
KeyError: 'activate_build_system'

My .sublimets file is auto generated (with a couple of tweaks that used to work before).
My tsconfig.json is:

{
    "compilerOptions": {
        "module": "commonjs",
        "removeComments": true,
        "out": "app.js",
    }
}

I really don't know why two config files are necessary, please upload examples on how to use it correctly.

Thanks for reading :)

Remove big example files from the plugin

Why do I need to download a copy of phaser.js which is 2.7 MB to use this plugin?!! This is just an examle. Your plugin is huge 25MB. create a separate branch (i.e. publish or deploy) that only has the plugin code, without the screenshot and examples and add that branch to the Package Manager Repo.

'NoneType' object is not subscriptable

Hi, the plugin keeps crashing with following message: "'NoneType' object is not subscriptable"

I've isolated the reason to files which reference other files e.g. "/// "

TS Server ?

Hi ...

I just seen that this new TS Server have been pulled into the tsc project, and if I am not mistaken this may be a future but also better solution than the tss : microsoft/TypeScript#2041

If that could be used, less middle layer are needed for this service.

Request: do project initialization in the background

For large projects, initialization can take a long time (somewhere between 10 and 30 seconds for a project I work on), so it's annoying to have a modal initialization dialog that blocks all operations in the editor. Could the loading be done in the background and the indicator moved to the status bar?

Some example use cases:

  • I previously had ST open with files from my large project. I reopen it to quickly look at an unrelated file. I can't do anything until the large project finishes initializing.
  • I want to start looking at or working on something in my large project even before auto-complete and such are available.

Auto completion - angular.d.ts and angular-route.d.ts issue

Hi,

When I'm using angular.d.ts (borisyankov/DefinitelyTyped) in my project, the auto completion not works. I work in this file, to found the problem. When I comment the line #935 (all(promises: IPromise[]|{ [id: string]: IPromise; }): IPromise<any[]>;) that works fine, but with this line uncommented, auto completion doesn't work.

In Visual Studio 2015 CTP 6 that works fine.

Tested on:
Windows 8.1/Mac OSx/Ubuntu
Sublime Text 3 - build 3065

Build fails if output_dir_path setting contains a space.

So far I've been very happy with this plugin, but I ran into this error lately. Normally a space in the outDir wouldn't be an issue, as you could enclose the path with '', but I am using a relative path to work on multiple computers. On one of the machines I work on, my Windows user directory contains a space, and so the build fails.

From the log, it appears that the outDir option is not enclosed in 's when building.

Completion not context-sensitive and stack-oveflows

Hi,

There's still no context-bound completion and the old stack-overlowing error shows up again.

Here's a screenshot of a completion in one of my classes and the console output of Sublime.

Regards,
Harris

stack_overflow

import from ES6 syntax

Does the plugin handle the import from new syntax? It's not offering me code completion when using

import MyModule from 'mymodule';
MyModule. // shows no code completion, says in the bottom ArcticTypeScript: no completions available

Post-processing commands in tsconfig file not working

Hi,

When I build the example Arctic Typescript project, "Common JS Module with Tests", the compiler fails to execute the post-processing commands given in the tsconfig.json file. I'm using Sublime Text Build 3083 on Windows 8 with Node 0.12.2.

Playing around with the issue I found out even the most simple post-processing command does not execute (i.e. mkdir randomDirectory or echo hello. After some investigation of the issue I found out that if I simply comment out line 60 of the file lib/commands/Compiler.py, which originally read post_cmd = expand_variables(str(post_cmd), self.project, use_cache=True), the post processing commands work (see output from console below):

>>> ['node', 'C:\\Users\\JWhite\\AppData\\Roaming\\Sublime Text 3\\Packages\\ArcticTypescript\\bin\\node_modules\\typescript\\bin\\tsc', '--project', '.']

>> mocha -C -R spec built/test

Array

#indexOf()

√ should return -1 when the value is not present

...

Can we get a fix for this? I apologize for not uncovering the true source of the bug; once I found out this worked I was content to stop there without trying to debug the offending expand_variables function. Thanks!

TODO: handle nested error messages

var U = {"wer": 33, "ttz": {"werwer": 77, "oo": [1,2,3]}}


U.ttz = 3;


/*ArcticTypescript: error   : Internal ArcticTypescript error during show_errors: 
[
    {
    "file":"c:/users/danie_000/appdata/roaming/sublime text 3/packages/arctictypescript/tests/issue30/main.ts",
    "start":{"line":6,"character":1},
    "end":{"line":6,"character":6},
    "text": {
             "messageText" : "Type 'number' is not assignable to type '{ \"werwer\": number; \"oo\": number[]; }'.",
             "category":1,
             "code":2322,
             "next": {
                "messageText":"Property '\"werwer\"' is missing in type 'Number'.",
                "category":1,
                "code":2324
             }
    },
    "code":2322,
    "phase":"Semantics",
    "category":"Error"
}
]

This gives this error structure. Text is a dict and not a string in this case, so

   'dict' object has no attribute 'replace'

will raise in ArcticTypescript

New references don't work until project is reloaded

When I add a new /// <reference path="whatever.d.ts"> in a file, I get an error marker, and the error is File '/path/to/whatever.d.ts' not found. The error goes away when I reload the project. It seems like reference changes like this should be detected automatically rather than the user needing to manually reload the project. Or at least it's something to consider--I can also see reasons why it wouldn't be such a good idea, like the fact that loading takes a long time for large projects (and blocks all other operations...something else to look at?).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.