Typescript become more and more important since angular2 use Typescript as main codebase.
i think we should jump on the train and should support Typescript. What i mean is, we should provide the type definitions for canjs 3.0
if we provide the typing, users from angular2 may find it easier to use canjs. with Typescript we also have the benefit static type-checking and API definition for canjs.
compiling .ts to javscript have to be done in the IDE or gulp. i dont think it is necessary to transpile typescript in the browser.
i think it is a little bit more then just generate typings by documentjs.[quote=“justinbmeyer, post:2, topic:211”]
i saw GitHub - retro/steal-ts, but to compile typescript in the browser we need a 3MB file. i dont like that idea. also we only get erros (type checking) while compiling typescript. so we need to do this in the IDE.
i think with the introduction of angular2 much programers will know typescript and how to use it. so i dont see any reason for do all the stuff in a blackbox
also i thought about rewriting canjs in typescript. we can remove lot of old stuff like can.Construct which is the base of all. but in ES6 and typescript classes can be extends and have static properties as well. i think in 3.0 or maybe in 4.0 we have to rewrite your codebase. if we do not, we lose the connection
we have to provide new experience for users. if we dont do that, the canjs community will fade away… the canjs community is still not that big.
as you said (in the hangout), there are good points for canjs, but are they convincingly to use canjs instead of other frameworks?
@justinbmeyer if you will or not, we have to compete to other frameworks
i will, behind typescript there a global players like google an microsoft.
sorry @matthewp do not understand what you are saying…
we need to compile typescript with an IDE, if we dont, we didn’t see any compiling error. the typescript compiler checks type-checking and erros while compiling.
the ts-compiler exports typescript file into a commonjs or AMD file.
there is a tsconfig.json where you can set compiler options. with outDir you can specifiy an output folder, preferably src. of course steal can import those compiled file in the output folder.
There are lots of ways we can bring a new experience. I’d argue strongly that DoneJS is already. Using someone else’s typed language doesn’t seem to me to be one. We’d be investing a lot of time to follow a sliver of total JS users.
I’d rather prioritize innovation, evangelism, and cleanup of what we have. Chasing popularity shouldn’t be the goal of DoneJS. It should be providing a steady, and rock solid dev experience. Besides, DoneJS is far more powerful than type safety.
If there becomes more typescript users than JS, I’d totally be on board. But there’s also a huge elm contingent right now. I’ve seen more talks on that than typescript lately.
I like typescript, just not enough to think we should adopt it at this time. A few people said we should do coffee a few years ago. Because MSFT and GOOG adopt it doesn’t mean everyone else will.
Are you sure that we couldn’t use DocumentJS to provide a header file? We have practically every signature’s params and return value typed out.
We should definitely have demo projects that use TypeScript though. @pYr0x if you’re interested you could fork a project like place-my-order and rewrite it in TypeScript.