Some questions from an Angular user who is confused with types, typescript, atscript

176 views
Skip to first unread message

Guido Tapia

unread,
Jan 28, 2015, 9:33:24 PM1/28/15
to traceur-comp...@googlegroups.com
Looked through the group and could not find much info, sorry if repeating prev questions and for the barrage of questions.

- From my reading into atscript it appears that it is a supperset of typescript; Given this is my premise then my questions are:
- I am using gulp-traceur is this up to date enough for me to get atscript code support?  Do I need to perhaps not use gulp for my traceur (gulp-traceur appears to be only a month old or so tho)
- I am using the gulp-traceur flags: moduleName, script, types, typeAssertions, annotations, experimental, atscript all set to true;  Anything else I need
- Assuming I have set things up correctly why the following:
  - I cannot set up complex (well anything beyond very basic) type expressions:
    - Typescript style array type expressions are not working
    - Function type declarations not working (even simple function types like function():void {})
    - Optional types (i.e. nullables)?
    - Required types (i.e. non-nullables)?
    - Objects with specific member types
    - Have not even tried Generics yet
  - Typescript style external modules also not working, ES6 modules are working tho which is good but I would like a more 'namespaced' approach rather than AMD monolithic modules approach 


- Am I jumping onto atscript too early, should I really be looking at typescript for now and upgrading once ATS is more mature?  I love the idea of annotations, reflection, and future proofing my Angular stuff so hopefully I'm just doing something silly with my traceur config.

Guido Tapia

John J Barton

unread,
Jan 29, 2015, 11:05:55 AM1/29/15
to traceur-comp...@googlegroups.com
I don't know about the status of type-related features and gulp-traceur is an independent project.   However I suggest that you should not normally use the options script and moduleName.  If you are setting options individually , then 'experimental' just adds confusion.

jjb

--
You received this message because you are subscribed to the Google Groups "traceur-compiler-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to traceur-compiler-d...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Erik Arvidsson

unread,
Jan 29, 2015, 11:35:54 AM1/29/15
to traceur-comp...@googlegroups.com
On Thu, Jan 29, 2015 at 8:05 AM, John J Barton
<johnj...@johnjbarton.com> wrote:
> I don't know about the status of type-related features and gulp-traceur is
> an independent project. However I suggest that you should not normally use
> the options script and moduleName. If you are setting options individually
> , then 'experimental' just adds confusion.
>
> jjb
>
> On Wed, Jan 28, 2015 at 6:33 PM, Guido Tapia <guido...@gmail.com> wrote:
>>
>> Looked through the group and could not find much info, sorry if repeating
>> prev questions and for the barrage of questions.
>>
>> - From my reading into atscript it appears that it is a supperset of
>> typescript; Given this is my premise then my questions are:
>> - I am using gulp-traceur is this up to date enough for me to get atscript
>> code support? Do I need to perhaps not use gulp for my traceur
>> (gulp-traceur appears to be only a month old or so tho)
>> - I am using the gulp-traceur flags: moduleName, script, types,
>> typeAssertions, annotations, experimental, atscript all set to true;

atscript should be enough here and it will set all the options you
should care about for atscript.

>> Anything else I need
>> - Assuming I have set things up correctly why the following:
>> - I cannot set up complex (well anything beyond very basic) type
>> expressions:

Our type syntax is not 100% complete yet.
Our runtime type assertions are even more behind.
And we do not do any static type checking.

>> - Typescript style array type expressions are not working

Works.

>> - Function type declarations not working (even simple function types
>> like function():void {})

var f : () => Object;

>> - Optional types (i.e. nullables)?
>> - Required types (i.e. non-nullables)?

nullable and union types are not supported yet

>> - Objects with specific member types

Works.

>> - Have not even tried Generics yet

Works.

>> - Typescript style external modules also not working, ES6 modules are
>> working tho which is good but I would like a more 'namespaced' approach
>> rather than AMD monolithic modules approach

There is no plan to support TS modules.

>> - Am I jumping onto atscript too early, should I really be looking at
>> typescript for now and upgrading once ATS is more mature? I love the idea
>> of annotations, reflection, and future proofing my Angular stuff so
>> hopefully I'm just doing something silly with my traceur config.

All the "works" above can be seen at http://goo.gl/TdSnwF

You are a bit ahead of your time here. The smoothest path goes down
the Angular tool chain. I don't known when or where that will be
available.


--
erik

Guido Tapia

unread,
Jan 29, 2015, 4:01:06 PM1/29/15
to traceur-comp...@googlegroups.com


All the "works" above can be seen at http://goo.gl/TdSnwF


Wow, thanks for the great reply and the effort to put up the code samples. 
Reply all
Reply to author
Forward
0 new messages