-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Class Example in Page "Interface" #543
Comments
Hi @basarat , Since I'm really new in typescript. So it's a little hard for me to dealing with code snippets that can't run out of the box. Besides this "Issue" above. I've figured out some others like in section Callable snippets about Because I know this book's topic is something that let people "deep dive". So the audience may not persons like me. Feel free to close this issue, and I'll know what I found like this one is not treated as issue on your side. And I will stop going on report them. If you do think these can be treated as issues, I'll be more then happy to try to make PRs if I got answers. Big thanks again for your effort put in this book! 🌹 🌹 🌹 |
There are still some questions / possible small issues comes across these days. Since @basarat still not take response to my Issue ticket. So please allow me to point out another one here: In Chapter Exception Handling there is a example in secsion "You don't have to throw an error" as follow: function myFunction (callback: (e?: Error)) {
doSomethingAsync(function () {
if (somethingWrong) {
callback(new Error('This is my error'))
} else {
callback();
}
});
} I think variable function myFunction (callback: (e?: Error)) {
doSomethingAsync(function (somethingWrong:any) {
if (somethingWrong) {
callback(new Error('This is my error'))
} else {
callback();
}
});
} |
Hey Basarat,
I'm reading the secsion Interface of the book. And decided to copy & past some snippet into typescript Playground. I've find that your code may not designed to be copyAndPastable. (See this result)
As a beginner for
class
in Javascript, I belive here I may initializex
andy
in the constructure. So what's your purpose here? Prefer a concise expression as exist on the book or others?BTW:
Awesome book really! I'm sure I will buy you something after I slowly finish my reading in the new future! 🌹
I'm pretty sure I've been your fans now 💘
Cheers
Su Gao
The text was updated successfully, but these errors were encountered: