You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
When selecting the 'Try' button and opening TypeScript playground (or simply copy and pasting the code locally), running some of the code samples does not allow users to see the results of the code (thinking in terms of beginners or those trying to get more of an understanding).
Suggestion: Update TS code samples to actually call functions created in code samples:
function printAll(strs: string | string[] | null) {
if (typeof strs === "object") {
for (const s of strs) {
console.log(s)
}
}
else if (typeof strs === "string") {
console.log(strs)
}
else {
// do nothing
}
}
to
function printAll(strs: string | string[] | null) {
if (typeof strs === "object") {
for (const s of strs) {
console.log(s)
}
}
else if (typeof strs === "string") {
console.log(strs)
}
else {
// do nothing
}
}
printAll("just wanna see something")
The text was updated successfully, but these errors were encountered:
Hey, @gcrev93 Just wanted to provide some feedback here. How about when we click on Try, rather than opening the URL, it runs the code there itself to show results. May be using iframe. That will help in not navigating away from the page. If not an iframe then maybe open up the link in a new tab. The idea behind is to make sure the user is not taken away from the handbook.
We're probably gonna stick with sending folks to the playground in a new window when it moves to the website, getting a copy of the compiler and any deps to run the JS is about 8MB of downloads and just not worth the extra bandwidth when we can have it running in the playground
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When selecting the 'Try' button and opening TypeScript playground (or simply copy and pasting the code locally), running some of the code samples does not allow users to see the results of the code (thinking in terms of beginners or those trying to get more of an understanding).
Suggestion: Update TS code samples to actually call functions created in code samples:
to
The text was updated successfully, but these errors were encountered: