-
Notifications
You must be signed in to change notification settings - Fork 10
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
Rewrite in TypeScript #28
Comments
Hi guys, I am in the process of adding types to @cycle/collection. We'll see if I am really able to achieve this task but, for the moment, it's pretty smooth. I have a question though, concerning default parameters' value. The function
I have a few ideas in mind, but I am not sure what is the best way to deal with this. either
function collection(options: Options, items?: Array<Collection>) {
items = items || []
}
I am pretty new to typescript so the exercise is really interesting! If you have any tips to help my, I'd be grateful :) |
Does it work if you use |
@Hypnosphi Where should I put this? in the signature? |
Oh, I though it's because of xs.never() used somewhere |
In general, I don't know how to deal with default values. Typescript won't let me type them. I'd like to do something like function collection (options: Options, items = []: Array<Component>) {
} But it seems typescript doesn't understand this notation |
|
@Hypnosphi oh god, it works!!! I am confused I though I tried this notation :/ |
Hi guys, I just created a similar library called cycle-lot. It's 100% percent in typescript and uses proxies to make API simpler. I'd really appreciate your feedback on it. Let me know what you all think! |
No description provided.
The text was updated successfully, but these errors were encountered: