Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 9808557

Browse files
committed
Fix nav
1 parent 9850f77 commit 9808557

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

pages/release notes/TypeScript 3.8.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
* [Type-Only Imports and Exports](#type-only-imports-exports)
1+
* [Type-Only Imports and Exports](#type-only-imports-and-exports)
22
* [ECMAScript Private Fields](#ecmascript-private-fields)
33
* [`export * as ns` Syntax](#export-star-as-namespace-syntax)
44
* [Top-Level `await`](#top-level-await)
55
* [JSDoc Property Modifiers](#jsdoc-modifiers)
66
* [Better Directory Watching on Linux and `watchOptions`](#better-directory-watching)
77
* ["Fast and Loose" Incremental Checking](#assume-direct-dependencies)
88

9-
## <span id="type-only-imports-exports" /> Type-Only Imports and Export
9+
## Type-Only Imports and Exports
1010

1111
This feature is something most users may never have to think about; however, if you've hit issues under `--isolatedModules`, TypeScript's `transpileModule` API, or Babel, this feature might be relevant.
1212

@@ -61,7 +61,7 @@ This flag takes 3 different values:
6161

6262
For more information about the feature, you can [take a look at the pull request](https://github.com/microsoft/TypeScript/pull/35200), and [relevant changes](https://github.com/microsoft/TypeScript/pull/36092/) around broadening where imports from an `import type` declaration can be used.
6363

64-
## <span id="ecmascript-private-fields" /> ECMAScript Private Fields
64+
## ECMAScript Private Fields
6565

6666
TypeScript 3.8 brings support for ECMAScript's private fields, part of the [stage-3 class fields proposal](https://github.com/tc39/proposal-class-fields/).
6767

@@ -262,7 +262,7 @@ A final consideration might be speed: `private` properties are no different from
262262
In contrast, because `#` private fields are downleveled using `WeakMap`s, they may be slower to use.
263263
While some runtimes might optimize their actual implementations of `#` private fields, and even have speedy `WeakMap` implementations, that might not be the case in all runtimes.
264264

265-
## <span id="export-star-as-namespace-syntax" /> `export * as ns` Syntax
265+
## `export * as ns` Syntax
266266

267267
It's often common to have a single entry-point that exposes all the members of another module as a single member.
268268

@@ -280,7 +280,7 @@ export * as utilities from "./utilities.js";
280280
This is a nice quality-of-life improvement to JavaScript, and TypeScript 3.8 implements this syntax.
281281
When your module target is earlier than `es2020`, TypeScript will output something along the lines of the first code snippet.
282282

283-
## <span id="top-level-await" /> Top-Level `await`
283+
## Top-Level `await`
284284

285285
TypeScript 3.8 provides support for a handy upcoming ECMAScript feature called "top-level `await`".
286286

@@ -318,13 +318,13 @@ Support within several environments and bundlers may be limited or may require e
318318

319319
For more information on our implementation, you can [check out the original pull request](https://github.com/microsoft/TypeScript/pull/35813).
320320

321-
## <span id="es2020-for-target-and-module" /> `es2020` for `target` and `module`
321+
## `es2020` for `target` and `module`
322322

323323
TypeScript 3.8 supports `es2020` as an option for `module` and `target`.
324324
This will preserve newer ECMAScript 2020 features like optional chaining, nullish coalescing, `export * as ns`, and dynamic `import(...)` syntax.
325325
It also means `bigint` literals now have a stable `target` below `esnext`.
326326

327-
## <span id="jsdoc-modifiers" /> JSDoc Property Modifiers
327+
## JSDoc Property Modifiers
328328

329329
TypeScript 3.8 supports JavaScript files by turning on the `allowJs` flag, and also supports *type-checking* those JavaScript files via the `checkJs` option or by adding a `// @ts-check` comment to the top of your `.js` files.
330330

@@ -380,7 +380,7 @@ new Foo().stuff++;
380380
// Cannot assign to 'stuff' because it is a read-only property.
381381
```
382382

383-
## <span id="better-directory-watching" /> Better Directory Watching on Linux and `watchOptions`
383+
## Better Directory Watching on Linux and `watchOptions`
384384

385385
TypeScript 3.8 ships a new strategy for watching directories, which is crucial for efficiently picking up changes to `node_modules`.
386386

pages/release notes/TypeScript 3.9.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
* [Improvements in Inference and `Promise.all`](#promise-improvements)
1+
* [Improvements in Inference and `Promise.all`](#improvements-in-inference-and-promiseall)
22
* [Speed Improvements](#speed-improvements)
3-
* [`// @ts-expect-error` Comments](#ts-expect-error-comments)
4-
* [Uncalled Function Checks in Conditional Expressions](#uncalled-in-conditionals)
3+
* [`// @ts-expect-error` Comments](#-ts-expect-error-comments)
4+
* [Uncalled Function Checks in Conditional Expressions](#uncalled-function-checks-in-conditional-expressions)
55
* [Editor Improvements](#editor-improvements)
6-
* [CommonJS Auto-Imports in JavaScript](#cjs-auto-imports)
7-
* [Code Actions Preserve Newlines](#preserve-newlines)
8-
* [Quick Fixes for Missing Return Expressions](#missing-returns)
9-
* [Support for "Solution Style" `tsconfig.json` Files](#solution-style-tsconfig)
6+
* [CommonJS Auto-Imports in JavaScript](#commonjs-auto-imports-in-javascript)
7+
* [Code Actions Preserve Newlines](#code-actions-preserve-newlines)
8+
* [Quick Fixes for Missing Return Expressions](#quick-fixes-for-missing-return-expressions)
9+
* [Support for "Solution Style" `tsconfig.json` Files](#support-for-solution-style-tsconfigjson-files)
1010
* [Breaking Changes](#breaking-changes)
1111

12-
## <span id=promise-improvements /> Improvements in Inference and `Promise.all`
12+
## Improvements in Inference and `Promise.all`
1313

1414
Recent versions of TypeScript (around 3.7) have had updates to the declarations of functions like `Promise.all` and `Promise.race`.
1515
Unfortunately, that introduced a few regressions, especially when mixing in values with `null` or `undefined`.
@@ -47,7 +47,7 @@ We initially anticipated shipping `awaited` in TypeScript 3.9, but as we've run
4747
As a result, we've decided to pull the feature out of our main branch until we feel more confident.
4848
We'll be experimenting more with the feature, but we won't be shipping it as part of this release.
4949

50-
## <span id=speed-improvements /> Speed Improvements
50+
## Speed Improvements
5151

5252
TypeScript 3.9 ships with many new speed improvements.
5353
Our team has been focusing on performance after observing extremely poor editing/compilation speed with packages like material-ui and styled-components.
@@ -69,7 +69,7 @@ TypeScript 3.9 addresses this issue by [changing the internals of how the compil
6969

7070
While there's still room for improvement, we hope this work translates to a snappier experience for everyone!
7171

72-
## <span id=ts-expect-error-comments /> `// @ts-expect-error` Comments
72+
## `// @ts-expect-error` Comments
7373

7474
Imagine that we're writing a library in TypeScript and we're exporting some function called `doStuff` as part of our public API.
7575
The function's types declare that it takes two `string`s so that other TypeScript users can get type-checking errors, but it also does a runtime check (maybe only in development builds) to give JavaScript users a helpful error.
@@ -127,7 +127,7 @@ Unused '@ts-expect-error' directive.
127127
We'd like to extend a big thanks to [Josh Goldberg](https://github.com/JoshuaKGoldberg), the contributor who implemented this feature.
128128
For more information, you can take a look at [the `ts-expect-error` pull request](https://github.com/microsoft/TypeScript/pull/36014).
129129

130-
### <span id=what-about-ts-ignore /> `ts-ignore` or `ts-expect-error`?
130+
### `ts-ignore` or `ts-expect-error`?
131131

132132
In some ways `// @ts-expect-error` can act as a suppression comment, similar to `// @ts-ignore`.
133133
The difference is that `// @ts-ignore` will do nothing if the following line is error-free.
@@ -147,7 +147,7 @@ Pick `ts-ignore` if:
147147
* you are in the middle of an upgrade between two different versions of TypeScript, and a line of code errors in one version but not another.
148148
* you honestly don't have the time to decide which of these options is better.
149149

150-
## <span id=uncalled-in-conditionals /> Uncalled Function Checks in Conditional Expressions
150+
## Uncalled Function Checks in Conditional Expressions
151151

152152
In TypeScript 3.7 we introduced *uncalled function checks* to report an error when you've forgotten to call a function.
153153

@@ -191,7 +191,7 @@ function getAllFiles(startFileName: string) {
191191

192192
https://github.com/microsoft/TypeScript/issues/36048
193193

194-
## <span id=editor-improvements /> Editor Improvements
194+
## Editor Improvements
195195

196196
The TypeScript compiler not only powers the TypeScript editing experience in most major editors, it also powers the JavaScript experience in the Visual Studio family of editors and more.
197197
Using new TypeScript/JavaScript functionality in your editor will differ depending on your editor, but
@@ -200,7 +200,7 @@ Using new TypeScript/JavaScript functionality in your editor will differ dependi
200200
* Visual Studio 2017/2019 have [the SDK installers above] and [MSBuild installs](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild).
201201
* Sublime Text 3 supports [selecting different versions of TypeScript](https://github.com/microsoft/TypeScript-Sublime-Plugin#note-using-different-versions-of-typescript)
202202

203-
### <span id=cjs-auto-imports /> CommonJS Auto-Imports in JavaScript
203+
### CommonJS Auto-Imports in JavaScript
204204

205205
One great new improvement is in auto-imports in JavaScript files using CommonJS modules.
206206

@@ -223,7 +223,7 @@ TypeScript now automatically detects the types of imports you're using to keep y
223223

224224
For more details on the change, see [the corresponding pull request](https://github.com/microsoft/TypeScript/pull/37027).
225225

226-
### <span id=preserve-newlines /> Code Actions Preserve Newlines
226+
### Code Actions Preserve Newlines
227227

228228
TypeScript's refactorings and quick fixes often didn't do a great job of preserving newlines.
229229
As a really basic example, take the following code.
@@ -284,7 +284,7 @@ function printSquares() {
284284

285285
You can see more about the implementation [in this pull request](https://github.com/microsoft/TypeScript/pull/36688)
286286

287-
### <span id=missing-returns /> Quick Fixes for Missing Return Expressions
287+
### Quick Fixes for Missing Return Expressions
288288

289289
There are occasions where we might forget to return the value of the last statement in a function, especially when adding curly braces to arrow functions.
290290

@@ -300,7 +300,7 @@ Thanks to [a pull request](https://github.com/microsoft/TypeScript/pull/26434) f
300300

301301
![TypeScript fixing an error where no expression is returned by adding a `return` statement or removing curly braces.](https://devblogs.microsoft.com/typescript/wp-content/uploads/sites/11/2020/04/missingReturnValue-3-9.gif)
302302

303-
### <span id=solution-style-tsconfig /> Support for "Solution Style" `tsconfig.json` Files
303+
### Support for "Solution Style" `tsconfig.json` Files
304304

305305
Editors need to figure out which configuration file a file belongs to so that it can apply the appropriate options and figure out which other files are included in the current "project".
306306
By default, editors powered by TypeScript's language server do this by walking up each parent directory to find a `tsconfig.json`.
@@ -325,7 +325,7 @@ Here, none of these `tsconfig.*.json` files get picked up by the server, but we'
325325
TypeScript 3.9 adds support to editing scenarios for this configuration.
326326
For more details, take a look at [the pull request that added this functionality](https://github.com/microsoft/TypeScript/pull/37239).
327327

328-
## <span id=breaking-changes /> Breaking Changes
328+
## Breaking Changes
329329

330330
### Parsing Differences in Optional Chaining and Non-Null Assertions
331331

0 commit comments

Comments
 (0)