Typescript: Suggestion Backlog Slog, 8/6/2018

Created on 6 Aug 2018  ·  3Comments  ·  Source: microsoft/TypeScript

  • #5453 Variadic kinds - what use cases remain here?
  • #26234 Disallow truthy checks of void
  • #5203 Disallow OOB access on tuples
  • #5863 Static polymorphic this
  • #23005 T[K] should be never when K is never
  • #22892 string enum object should be indexable type
  • #22851 esModuleInterop should work when target = esnext
  • #22815 Abstract classes that implement interfaces shouldn't require method signatures
  • #22806 Partial<T> should be a weak type
  • #22769 Allow unshadowed parameter initializer references in ES6+
  • #22759 Let JSX children be subject to tupleness
  • #22709 Allow references to literal-ish-initialized enums in type positions
  • #22669 Add a new overload to Function#bind
  • #22665 Add a mode to make TS act like JS
  • #22649 Combine tsconfig with file list
  • #22610 Keep infer variable in scope in false arm of conditional type
  • #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
  • #22598 Allow speculative union type property access in typeof (expression) operands
  • #22509 Something something mapped types
  • #22311 Error on out-of-scope literal assigned to enum
  • #22230 Allow implicit undefined->0 coercion under strictNullChecks for bitwise ops
  • #22208 Prefer .d.ts over .ts if it's in files array
  • #26136 Arg union type inference for overloads
  • #26129 Forbid illogical generic declarations
Design Notes

Most helpful comment

Well, it's accepted
Wondering if actionable
We're imitating ActionScript

All 3 comments

  • #5453 Variadic kinds

    • Currently we allow you to capture tuples in variadic rest positions

    • But the tuples themselves cannot contain rests

    • This would allow deconstruction of tuples

    • What functions would be typable with this that currently aren't?

    • Promisify

    • Should we close holes that allow people to write trivial turing machines in the type system?

    • ??

  • #26234 Disallow testing void exprs

    • Breaking change

    • All goodness

    • Found bugs in us and VS Code

    • Found "type errors" in a couple other projects

  • #5203 OOB on tuples should be errors

    • :+1:

  • #5863 Polymorphic this

    • Static inheritance in signatures is plainly unsound

    • So calls to the polymorphic this are right out

    • Isn't what people want just the non-signature side?

    • Do people want instance-this or static-this ?

    • Representation vs checking

    • Discuss soundness

  • #23005 T[K] should be never

    • :+1:

  • #22892 String enums should be indexed types

    • Our dot behavior makes this a bad idea

  • #22815 Interface members in abstract classes

    • Should we copy them automatically?

    • It's presumably what you want

    • What happens to optional members?

    • They become... abstract optional? What is that even?



      • How do you not-implement an optional abstract member?



    • Need to avoid hop-skip-jump problem

    • Post some questions on this

  • #22806 Partial<T> should be weak?

    • It is

    • Weak checking applies to assignability, not comparability

    • WIA

  • #22769 Parameter initializers

    • Allow in ES6, error in downlevel only

  • #22759 Allow tuples in JSX children

    • :+1:

  • #22709 Enum literals

    • There are actually many kinds of enums under the hood

    • Union enums only get created when only bare literals (or nothing) are initializers

    • These kinds of enums behave differently

    • You might want one or the other and this is how you choose

    • WIA; would be a BC

  • #22311 Out-of-range enum assignment

    • Back compat problem

    • Not really a trap

    • Problem for e.g. mod flags

    • Maybe disallow in strict

  • #22230 undefined/null in & / |

    • :-1:

  • #26136 Inference of unions from argument lists

    • Would this imply filtering if you weren't capturing the whole argument list?

    • No (spreading back would be a nightmare)

WIA

Wounded in action?

EDIT: It suddenly occurs to me that this is probably "Works As Intended" as acronymized by Yoda. nmv...

Well, it's accepted
Wondering if actionable
We're imitating ActionScript

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fwanicka picture fwanicka  ·  3Comments

Roam-Cooper picture Roam-Cooper  ·  3Comments

DanielRosenwasser picture DanielRosenwasser  ·  3Comments

siddjain picture siddjain  ·  3Comments

MartynasZilinskas picture MartynasZilinskas  ·  3Comments