-
-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there any intelligent code hint plugins for webstorm or vscode? #390
Comments
vscode has good typescript support and assembly script is still valid typescript. For what it's worth, I use atom and it has type docs and explores type declarations. |
Yeah. But the new types provided by assemblyscript like |
try use this: /// <reference path="../node_modules/assemblyscript/index.d.ts" /> |
FWIW I have a few comments here.
There are plenty of differences between TypeScript and AssemblyScript. It's technically not a perfect subset of TypeScript. The following examples make things a bit clearer. Example 1: Type Castingfunction cast<T>(value: i32): T {
return <T>value;
} In this example we get the following error from the typescript even though this is 100% valid AssemblyScript, as long as the value can technically be cast at compile time.
I have suggested to @dcodeIO and @MaxGraey that we could use a function cast<T extends number>(value: i32): T {
return <T>value;
}
Yep. When using vscode, for instance, whenever I use a type backed by Example 2: Type Annotations@external("my", "imported", "function")
declare function imported_function(): void; This results in...
Of course, annotations don't belong on function declarations, or on inline functions. They usually only appear on class members to modify the class prototype. This is because TypeScript is guided by the ecmascript specification, wheras AssemblyScript has it's own parser/compiler combo and has a great use-case for annotations like I think there is a great use case for creating an AssemblyScript plugin for ides, but that should definitely be discussed in a RFC thread. |
@jtenner I think making some patches to https://github.com/Microsoft/monaco-typescript is going to give biggest bang for buck. |
The question is how do you differentiate between code written for assemblyscript and code written in typescript? |
There is |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Well, differentiating between the different |
Interesting that this has actually be discussed at TypeScript. Not too optimistic that this'll ever happen, though. My expectation at this point is that we'll have to create our own language service eventually, possibly switching to an |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Is there a way to tell @stale[bot] not to close an issue? |
It's currently configured to automatically mark issues without further activity as stale and close them after a while if no new activity happens, unless tagged as |
Is there currently a way to to tell TypeScript (not AssemblyScript) not to complain about I'm using Atom with the atom-typescript plugin, so that I can get all the IDE features. |
We use |
Ah, true, it won't compile anyways. So looks like the trick of putting those imports in a separate file (like in #384 (comment)) may be the way to do it. I will also look at exporting |
Regarding the @external decorator on declarations; If it's not valid TypeScript, should it be valid AssemblyScript? I thought AS was a subset of TS? |
in some parts it's stricter subset (no |
Closing this issue as part of 2020 vacuum because it is more a question, with a solution being discussed elsewhere as part of creating a custom language server. |
A better code hint maybe improve the experience for developing assemblyscript~
The text was updated successfully, but these errors were encountered: