2) Even after placing in the ///reference calls I get an error stating "cannot compile external modules unless --module flag is provided". Usually thats fixed by setting the project properties to use AMD as the module system but I don't see that setting under the project properties anywhere.
3) In solution explorer it shows the related .js, and .js.map for every .ts file which makes things kind of crowded. Is there a way to configuration settings to tell solution explorer to only display the .ts file as VS normally does?
4) I'm guessing that there is no support for nuget at all since I don't see a menu item for it in the right-click menu, is that correct?
8 Answers, 1 is accepted
Thank you for your interest in our TypeScript support!
Here are the answers to your questions:
1. In Visual Studio, all files that have build action “TypeScript Compile” implicitly reference each other. If you change the build action of your ts and declarations files to “TypeScript Compile” you should have intellisense without adding /// references. We will improve our project templates to have the TypeScript Compile build action set by default.
2. You are correct, we haven’t exposed the TypeScript build properties yet. We are still looking for the best way to handle that.
3. Visual Studio just doesn’t include the JavaScript file. You can remove the JavaScript file from the project if you would like (compiling will continue to work), but we prefer having the JavaScript file in the project by default. Nesting the JavaScript file under the corresponding TypeScript file definitely makes sense, so we will most probably implement it in the future.
4. The NuGet UI works with known project types. Unfortunately, the AppBuilder project type is unknown to NuGet, so the commands for managing packages are unavailable. The good news is that the Package Manager Console works and you can install packages using “Install-Package”. In fact, Python and Node.js have the very same problem and we are monitoring how the NuGet team will handle the pull request for adding these project types as known projects.
If you have any other questions or suggestions, please don't hesitate to write back!
Regards,
Svetlozar
Telerik
Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!
----------------------
love the direction you are taking with mobile projects supporting typescript.
please, please, please add a project property for specifying the typescript module system (or even a way to manually edit the iceproj file) so this flag gets added to the typescript compile.
i was very excited with the new appbuilder typescript support, but then disappointed because without a way to specify the typescript module system, i can't leverage typescript in my appbuilder mobile projects. i use amd to load everything.
the workaround for now is to build the typescript files in a separate website project and manually add the resulting js files to the mobile project. this works for now.
ultimately, in a perfect world, i would like to have a single project that generates my website and my mobile apps for all platforms (seems like a lot to ask, but you guys rock, so i'm asking)
Thank you for the feature request and all the feedback about our product. We will definitely have it in mind for our future releases.
Further, here is the reply from a colleague of mine:
"... in our Windows Client the setting is exposed in Options | General | Text Editor | TypeScript | Compilation Settings.
Visual Studio also has settings for that (although it slightly depends on how you've setup your project). Our In-Browser Client doesn't expose that particular setting yet, but we will add it."
I hope this helps. Please, let me know if there is anything else you want to ask.
Regards,
Kaloyan
Telerik
Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!
I tried to give some more details about our VS story here - http://feedback.telerik.com/Project/129/Feedback/Details/132208-typescript-amd-typescript-module-system-option-in-compiler
We are still looking for the best way to handle all scenarios. Meanwhile, I suggest you compile your TypeScript files on save using VS Tools – Options – Text Editor – TypeScript – Project – Compile On Save – Automatically compile TypeScript files which are not part of a project.
If you have any questions or suggestions, please don't hesitate to write back.
Regards,
Svetlozar
Telerik
Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!
There is another way.... but you guys may not like it :)
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<TypeScriptRemoveComments>false</TypeScriptRemoveComments>
<TypeScriptSourceMap>False</TypeScriptSourceMap>
<TypeScriptTarget>ES5</TypeScriptTarget>
<TypeScriptModuleKind>amd</TypeScriptModuleKind>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<TypeScriptRemoveComments>true</TypeScriptRemoveComments>
<TypeScriptSourceMap>false</TypeScriptSourceMap>
<TypeScriptTarget>ES5</TypeScriptTarget>
<TypeScriptModuleKind>amd</TypeScriptModuleKind>
</PropertyGroup>
if you add the code above to your .iceproj file right above the typescript imports at the bottom of the file you can use typescript they way you want to.
I have web essentials installed as well so that may also have something to do with why this works for me, I am guessing that the typescript files are being built locally rather than at compile on the server as I have also noticed that I must ensure my duplicate js files are included in the project or I get errors.
I hope this helps someone
Thank you for sharing this with the community.
Regards,
Kaloyan
Telerik
Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.