-
Notifications
You must be signed in to change notification settings - Fork 13k
Open
Labels
Design NotesNotes from our design meetingsNotes from our design meetings
Description
The configDir
Configuration Variable
- Configuration variable for directory of the current
tsconfig.json
- We are leaning towards
configDir
- We are also looking towards using
${
and}
as the delimiters.- This is awful because lint rules.
- We are leaning towards
<
and>
avoid conflicts, but we kinda like.- Why
configDir
? Why notprojectDir
?- Shrug.
- We like that it matches VS Code's style and matches intuitions JS template strings.
Correctly Check this
Type Predicates
-
We were not correctly checking
this
type predicates. -
This PR actually performs the checking.
-
Unfortunate that this breaks:
interface Animal { isDog() this is Dog; } interface Dog { isDog(): true; }
-
Kind of weird that someone wrote this
interface Animal { isDog() this is Dog; } interface Dog { isDog(): this is never; }
- But this is wrong - type predicates have to be invariant.
- Wait really?
- Yes really.
- Why?
- Because type predicates returning false implies that the type should be narrowed to the negative cases.
- If you had
Poodle
saythis is Poodle
, then returning false implies that you don't have a Dog if you have aBorderCollie
.
- But this is wrong - type predicates have to be invariant.
-
Is there a similar problem for assertion function?
-
This seems correct.
Perf Suites Benchmarking Additions/Modifications
microsoft/typescript-benchmarking#32
- We are trying to fix up our perf suite to get representative tests.
- Also, moving away from internal testing. Huge pain to maintain.
- Need to put out a call for test cases.
- Medium-sized (compiles between 10s to 30s)
- Modern (works on the latest version)
- Exhibits usage of diverse features
- Module modes (nodenext, bundler, preserve)
- JSX
- Decorators
- ...
noCheck
(or skipCheck
?)
- Will we be adding this as a
--build
option in the future? - We will probably need it for ourselves.
- However, if you run this from the command line, there's no way to know how to do this incrementally.
- So you'd have to have 2
tsconfig.json
s for each project.
- So you'd have to have 2
- What exaclty is going wrong?
tsc -b --skipCheck
outputs all.d.ts
files.- Then when you run
tsc -b
, all the outputs are newer so it doesn't try to rebuild!
- We would need different metadata to be stored to make this work.
- Also: likely won't work with
noEmitOnError
.- Or at least - it may work awkwardly with
noEmitOnError
.
- Or at least - it may work awkwardly with
- On the CLI, we don't feel like the UX makes sense yet, but we want to add this internally.
Metadata
Metadata
Assignees
Labels
Design NotesNotes from our design meetingsNotes from our design meetings