Ryan Cavanaugh

Results 449 comments of Ryan Cavanaugh
trafficstars

The option that controls this behavior is called `noUncheckedIndexedAccess`; you need to enable it if you want the type to be `number | undefined`

This seems extraordinarily difficult to reason about in nontrivial cases, if not impossible. Consider something like ```ts interface Foo { } declare function makeFooHaveBar(m: { bar?: number }): declares global...

You can use `.tsx` even if you're not using JSX syntax. Think of it as the "TypeScript eXtension" if that helps 😉

If it makes you feel any better, even if we did add a brand new file extension (which we won't), we'd almost certainly eschew the `ts/tsx` distinction and just have...

Is there anything else needed from the type system side to adequately address the use cases here?

@benhickson you need to enable [declaration source maps](https://www.typescriptlang.org/tsconfig#declarationMap) for that to happen

> At the moment, it seems like many TypeScript library authors only include definition files and compiled, minimized js files. Are there any processes in motion to improve this situation?...

> Find some method to validate feature compatibility Sure -- previous TypeScript versions are available on npm, and you can install+run them to see if they "work" given whatever definition...

I think it'd be valuable for us to more explicitly call out in the release notes which new syntaxes will appear in .d.ts files if you use them. What folks...

> A better approach would be: keep adding new syntaxes. Keep progressing. Add release notes to describe the new features. But either save the new volatile d.ts emissions for a...