Skip to content
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

No npm ? #30

Open
howesteve opened this issue Apr 22, 2016 · 14 comments
Open

No npm ? #30

howesteve opened this issue Apr 22, 2016 · 14 comments

Comments

@howesteve
Copy link

Hello,

I wonder why this nice package isn't published on npm ? It surely is more standard then bower nowadays. Anyway, it wouldn't hurt.

Thanks,
Howe

@nippur72
Copy link
Owner

agree 100%, I am just waiting for Typescript 2.0 because UMD Module Loaders will make it more easy to publish a package as a module or in the global namespace (without manually writing definition files).

@tromantic
Copy link

Typescript 2.0 just came out. See: https://blogs.msdn.microsoft.com/typescript/2016/09/22/announcing-typescript-2-0/

Will RiotTS be published as a npm package in the near future?

@sandrokeil
Copy link
Contributor

@pcssi See riot-typescript. /cc @howesteve

@tromantic
Copy link

@sandrokeil Thank you!

@sandrokeil
Copy link
Contributor

@pcssi You're welcome. Have you used the npm version? I've some problems see #36 I'm not sure how to use it correclty. Have you tried the Timer example or can you give me a hint?

@nippur72
Copy link
Owner

nippur72 commented Oct 3, 2016

I'm trying to make a npm package out of RiotTS right now but there are several issue because it seems that there is no easy way to publish a library as a module and as a script at the same time. I'm experimenting with UMD modules...

@sandrokeil
Copy link
Contributor

@nippur72 Thanks for the info and your work! 👍

@nippur72
Copy link
Owner

nippur72 commented Oct 4, 2016

I've migrated the whole package to npm and TypeScript 2.0, please check the documentation again as there are some small breaking changes. I did my best to make it work in both scenarios (global and module) but I'm not sure of the result. Suggestions are welcome.

@sandrokeil
Copy link
Contributor

@nippur72 Thank you very much for your work. 👍 Hope I can try it soon. Is it possible to avoid the any type, because otherwise you must use "noImplicitAny": false. But I don't know, if it's really needed to avoid any.

@nippur72
Copy link
Owner

nippur72 commented Oct 4, 2016

@sandrokeil what do you mean with avoiding the any type?

@sandrokeil
Copy link
Contributor

@nippur72 If you use "noImplicitAny": true the error occurs: error TS7006: Parameter 'opts' implicitly has an 'any' type.. I've this config from the webpack/react tutorial.

noImplicitAny: true = Raise error on expressions and declarations with an implied ‘any’ type.

@nippur72
Copy link
Owner

nippur72 commented Oct 5, 2016

@sandrokeil that's quite correct, you are telling typescript that you don't allow implicit any types, so you can't write:

constructor(opts) { }

you have to make it explicit, e.g.:

constructor(opts: any) { }

or better:

interface HelloTagOpts {
   greet: string;
}
class HelloTag extends Riot.Tag {
   constructor(opts: HelloTagOpts) { }
}

@nippur72
Copy link
Owner

nippur72 commented Oct 5, 2016

btw, forgot to tell I've updated also the helloworld examples, you might want to check example-global and example-module.

@nippur72
Copy link
Owner

nippur72 commented Oct 5, 2016

update: I've fixed some any signatures, so please use the latest 1.0.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants