-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
add TypeScript section to Overview #491
Conversation
to explain type annotations, hopefully easing burden on non-TS consumers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comments
@@ -33,9 +33,41 @@ relevant sections in the sidebar for details about the styling & component APIs | |||
Most packages consist of JS and CSS resources, so please make sure you're including both in your application. | |||
</div> | |||
|
|||
### TypeScript | |||
|
|||
Blueprint is written in [TypeScript](https://www.typescriptlang.org/), a typed superset of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"statically typed". It's important to be precise here; JS is already dynamically typed, like every programming language
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 though i copied this from the TS website itself
Blueprint is written in [TypeScript](https://www.typescriptlang.org/), a typed superset of | ||
JavaScript that compiles to plain JavaScript. Many of the code samples throughout this site and all | ||
interactive examples are also written in TypeScript. TypeScript code looks exactly like ES2015 code | ||
(because it literally is) with the addition of type signatures. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove "(because it literally is)", that's misleading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
classic me
const option: IOption = { label: "Name", value: "gilad" }; | ||
``` | ||
|
||
**You do not need to use TypeScript to consume Blueprint** (but major "props" if you do). Familiarity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we render emojis in markdown and get the hat tip one here? pretty please :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oof i can't tell if you're kidding cuz obviously i want this too but i don't think we have emoji support on blueprintjs.com
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's usually up to the browser/OS to display emojis... but I also know there are web fonts to display them. I'm not kidding but obvs low priority
Blueprint is written in [TypeScript](https://www.typescriptlang.org/), a statically typed superset | ||
of JavaScript that compiles to plain JavaScript. Many of the code samples throughout this site and | ||
all interactive examples are also written in TypeScript. TypeScript code looks exactly like ES2015 | ||
code with the addition of type signatures. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯 alignment! rag game on point 🏆
@@ -16,6 +16,7 @@ $syntax-token-colors: ( | |||
"numeric": $rose2, | |||
"operator": $violet2, | |||
"punctuation": $dark-gray3, | |||
"storage": $violet3, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quick fix for light theme syntax, i missed a token
const option: IOption = { label: "Name", value: "gilad" }; | ||
``` | ||
|
||
**You do not need to use TypeScript to consume Blueprint** (but major "props" if you do). Familiarity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's usually up to the browser/OS to display emojis... but I also know there are web fonts to display them. I'm not kidding but obvs low priority
to explain type annotations, hopefully easing burden on non-TS consumers.
addresses #464