Skip to content
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

Suggestion Backlog Slog, 8/19/2019 #32981

Closed
RyanCavanaugh opened this issue Aug 19, 2019 · 8 comments
Closed

Suggestion Backlog Slog, 8/19/2019 #32981

RyanCavanaugh opened this issue Aug 19, 2019 · 8 comments
Assignees
Labels
Design Notes Notes from our design meetings

Comments

@RyanCavanaugh
Copy link
Member

@RyanCavanaugh RyanCavanaugh added the Design Notes Notes from our design meetings label Aug 19, 2019
@RyanCavanaugh RyanCavanaugh self-assigned this Aug 19, 2019
@falsandtru
Copy link
Contributor

Note that a solution #18588 (comment) is propose and it would be better than excludeTypes.

@RyanCavanaugh
Copy link
Member Author

  • PR Flag non-nullable functions in if statements as errors #32802 - flag non-calls to boolean functions in if expressions
    • Tree walk might actually be quite cheap in practice based on how the if-call pattern works
    • !! to suppress
    • Try tree-walk method as well to compare+contrast
  • PR Add es3.d.ts #28372 - add ES3.d.ts
    • Should have done this 7 years ago, but we didn't... seems useless at this point
    • Would be a breaking change since target is ES3 by default
    • 👎 dinosaur emoji
  • add stricter Omit helper type #30825 Add stricter omit type
    • Exclude doesn't constrain either
    • Omit without the constraint is perfectly cromulent
    • What is the principled distinction for what goes in the lib and what doesn't?
    • Should we add constrained versions of all the others too?
    • Infinite number of types we could put in the lib; this doesn't seem necessarily better than others
    • The constraint is infectious and this type wouldn't play well with others
    • 👎
  • Allow emitDeclaration and isolatedModules together #29490 isolatedModules is what?
    • Exactly what Ryan and Anders thinks it means
  • (myriad) Behavior when running tsc with an explicit file list when a tsconfig.json is present
    • We've literally all confused ourselves with this
    • msbuild...?
      • It's a live scenario, unfortunately
    • Issue a warning
    • Add a --ignore-tsconfig flag to suppress the warning
    • See if we can co-version the msbuild targets file with tsc.js
    • What about adding files to the file array? Highly-requested feature
      • Does the commandline files list augment or replace the tsconfig-specified files?
      • Ask users in that issue
  • Official TypeScript badge for READMEs #31569 Official README badges
    • Sure
  • Function interface doesn't type check return value for extra keys #12632 / Don't widen return types of function expressions #241 Return type widening of function expressions
    • Try again.
  • Proposal: covariance and contravariance generic type arguments annotations #10717 Explicit co/contra variance annotations
    • What would this even do? An "implements" or an override?
    • Example of function returning T[keyof T]
      • These come up from cases where the type producing the key is not aliased and therefore safe to treat covariantly (ugh)
    • Think about it more? 🤷‍♀️🤷‍♀️🤷‍♀️🤷‍♀️🤷‍♀️🤷‍♀️🤷‍♀️🤷‍♀️🤷‍♀️🤷‍♀️🤷‍♀️🤷‍♀️🤷‍♀️
    • getThing(k: keyof super T) ?
  • ts-ignore should error if next line is not an error #29394 Strict ts-ignore
    • Is this a flag, or a different syntax ts-expect-error
      • Different syntax
    • How do we do it performantly?
    • Accepting fast PRs

@fatcerberus
Copy link

isolatedModules is what?

I've been trying to figure this one out for ages. The handbook says:

Transpile each file as a separate module (similar to “ts.transpileModule”).

But that's kind of vague: Modules are already self-contained (modulo imported dependencies)--that's what makes them modules! I also remember reading somewhere that this option disables module resolution (like a "single-file transpiler mode"), but that's not true either: it's possible to import types from other files and have that work just fine.

Then there's VSCode which describes this option thus:

Unconditionally emit imports for unresolved files.

Which is just... what.

@RyanCavanaugh
Copy link
Member Author

The new Handbook will have a much more accurate description.

VS Code's description is... accurateish. Very accurateish. 😉

@fatcerberus
Copy link

Very accurateish.

Okay, fair, but clearly it does more than just that, considering how many things it disables in its wake (const enums, namespaces, etc.)

@RyanCavanaugh
Copy link
Member Author

Allow tsconfig.json when input files are specified: #27379

@RyanCavanaugh
Copy link
Member Author

@fatcerberus here ya go! https://microsoft.github.io/TypeScript-New-Handbook/reference/compiler-options/#isolatedmodules

@Validark
Copy link

Validark commented Sep 2, 2019

I really want to see NaN typing and NaN checking! That would be fantastic!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design Notes Notes from our design meetings
Projects
None yet
Development

No branches or pull requests

4 participants