Typescript: Suggestion Backlog Slog, 8/13/2018

Created on 13 Aug 2018  ·  2Comments  ·  Source: microsoft/TypeScript

  • Enum/number assignability review
  • any vs unknown on DT
  • #22669 Add a new overload to Function#bind
  • #22649 Combine tsconfig with file list
  • #22609 Do some type guards based on overload when a good discriminant is present
  • #22605 Provide a back-compat mechanism for bundled .d.ts files in package.json
  • #22509 Something something mapped types
  • #22230 Allow implicit undefined->0 coercion under strictNullChecks for bitwise ops
  • #22208 Prefer .d.ts over .ts if it's in files array
  • #26129 Forbid illogical generic declarations
  • #22598 Allow speculative union type property access in typeof (expression) operands
Design Notes

Most helpful comment

It's not up to randos on DT to decide your strictness policy

As one of those randos, this is a continuous concern of mine! It would be good if DT had a fairly complete style guide about things along these lines, but that's a different issue (specifically https://github.com/DefinitelyTyped/DefinitelyTyped/issues/2001 which lead to the now quite out of date and incomplete http://definitelytyped.org/guides/best-practices.html)

All 2 comments

  • Enum/number assignability review

    • Keep getting duplicates on this

    • Constant source of surprise when people notice

    • Back compat constraints limit our options

    • A commandline flag really is not what you want

    • Open a longer issue explaining the state of things

  • any vs unknown on DT

    • Impending disaster as people argue over what return types on DT should be

    • It's not up to randos on DT to decide your strictness policy

    • Ideally unknown would have acted as any under non-strict



      • Oops



    • Spitball: mixed type that is unknown in strict and any otherwise



      • Ugh



    • Anyone who would want strictUnknown probably actually wants strictAny

    • Revive strictAny and try to work through its problems again

    • Do not accept DT PRs for replacing any in output positions

    • unknown in input positions is OK

    • Bivariant positions: 🤷‍♂️

  • #22669 Add a new overload to Function#bind

    • Sure let's try it

  • #22649 Combine tsconfig with file list

    • -1

  • #22609 Do some type guards based on overload when a good discriminant is present

    • Recommend using conditional types in lieu of overloads whenever possible

  • #22605 Provide a back-compat mechanism for bundled .d.ts files in package.json

    • Ryan to write proposal

  • #22509 Something something mapped types

    • ?

  • #22208 Prefer .d.ts over .ts if it's in files array

    • +1

  • #26129 Forbid illogical generic declarations

    • -1 missed the boat and can't break the DT world

It's not up to randos on DT to decide your strictness policy

As one of those randos, this is a continuous concern of mine! It would be good if DT had a fairly complete style guide about things along these lines, but that's a different issue (specifically https://github.com/DefinitelyTyped/DefinitelyTyped/issues/2001 which lead to the now quite out of date and incomplete http://definitelytyped.org/guides/best-practices.html)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xealot picture xealot  ·  150Comments

OliverJAsh picture OliverJAsh  ·  242Comments

rwyborn picture rwyborn  ·  210Comments

RyanCavanaugh picture RyanCavanaugh  ·  205Comments

fdecampredon picture fdecampredon  ·  358Comments