Created
November 13, 2024 20:36
-
-
Save peterflynn/694871546dcf7c2f0d3373c118bcd953 to your computer and use it in GitHub Desktop.
TypeScript syntax highlighting test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function example1<T>(x: any): asserts x is T { } | |
function example2<T>(x: any): x is T { return true; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compare to the same code on TS Playground: https://www.typescriptlang.org/play/?#code/GYVwdgxgLglg9mABAUwB4EMC2AHANsgRgB4AVAPgApUAuRdMATwEpb0BnN5AJyjcVUQw+JRAG9EAXwBQM0JFgIUGHPgBMpSjTqMW-QcLGIuyKCC5IoXEMgDckqUA
(or in VS Code)