-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
Parse TypeScript syntax #690
Comments
Interfaces
Conflicts:
interface I { field: number }
class I { }
let o = new I(); // not a type error
console.log(o.field.toString()); // run-time error! |
Some interesting syntax quirks related to JSX: |
Here's an interesting file we could use for performance testing (almost 7 MiB): https://raw.githubusercontent.com/NativeScript/NativeScript/main/packages/types-android/src/lib/android/android-platform-31.d.ts and another (over 2 MiB): https://github.com/microsoft/TypeScript/blob/main/src/compiler/checker.ts |
TypeScript has too many syntax-level features. @_@ |
you're tellin' me! |
Shipped in version 3.0.0. |
Parser and variable analyzer:
<type>variable
type assertionsas
type assertions!
postfix operatorimport type
export interface
,export type
, etc.declare
module
this
parametersGenerator
)type T<U>=number;
(>=
) TypeScript: parse let x:T<U>=y #848export abstract class
satisfies
infer
(e.g.extends infer T extends
syntax fail to compile evanw/esbuild#2712)extends
in generic parameter definition #919in
/out
constructor(public foo: number)
,constructor(public readonly foo: number)
function f<const T>() {}
public declare readonly myField: number;
export declare function ...
<Type<GenericArg> />
(JSX + generic arguments)let foo!: Bar;
Integrations:
.ts
,.tsx
,.d.ts
--language=typescript
option--language=experimental-typescript
option.ts
,.tsx
,.d.ts
(--language=experimental-default
option)The text was updated successfully, but these errors were encountered: