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

Add 5.0 compiler options #2759

Merged
merged 20 commits into from
Mar 31, 2023
Merged

Add 5.0 compiler options #2759

merged 20 commits into from
Mar 31, 2023

Conversation

andrewbranch
Copy link
Member

No description provided.

@andrewbranch
Copy link
Member Author

It would be great if all the errors were reported to me at one time instead of waiting 20 minutes to find out the next one

@orta
Copy link
Contributor

orta commented Mar 27, 2023

Yeah, I would always update locally and so going through errors was trivial - I imagine that change might need to happen inside the shiki-twoslash project as I think we throw in there?

@andrewbranch
Copy link
Member Author

These errors don’t appear for me locally when I run any build command I can find

@andrewbranch
Copy link
Member Author

The one that’s failing now is one I’ve already updated. Stale cache or something?

@orta
Copy link
Contributor

orta commented Mar 28, 2023

Yeah, it not showing up locally sounds like a stale cache - I wonder why I never hit this each update

If you run rm -rf node_modules/.cache/twoslash it should empty the cache

WRT the server, it might be hitting the same thing but I doubt it, I think the node_modules cache gets ignored when the last build failed

@milesrichardson
Copy link

Regarding verbatimModuleSyntax, I think the docs could be slightly more clear, in terms of how it behaves differently when it's true vs. false. Right now it just says "by default, TypeScript does import ellision..." - how does this translate to the default value for verbatimModuleSyntax? It's not clear from the docs, AFAICT, but I might be missing something. Additionally, the type hint of "do not transform..." is confusing because - I'm assuming - it means "if set to true, do not transform..."

Maybe this won't be so confusing once all the docs are pushed out and there is more information about this on the web, but I just thought I'd mention I found it confusing while upgrading tonight.

Thanks for all the hard work on 5.0!

@andrewbranch
Copy link
Member Author

Error codes are scattered throughout https://github.com/microsoft/TypeScript-Website-Localizations and have to be changed there first. 🤬

@github-actions
Copy link
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-glacier-09aa73710-2759.centralus.azurestaticapps.net

@github-actions
Copy link
Contributor

github-actions bot commented Mar 30, 2023

Got false positives?

Make changes to the global settings spellcheck.json in /microsoft/TypeScript-Website.

Make changes to this repo's settings in spellcheck.json.

Typos for allowArbitraryExtensions.md

Line Typo
7 ) declaration files for those stylesheets:

Typos for noImplicitUseStrict.md

Line Typo
6 n emitting a module file to a non-ES6 target, TypeScript emits a `"

Typos for TypeScript 4.4.md

Line Typo
46 elves or use type assertions (a.k.a. casts).
51 a readonly property, or an un-modified parameter, then TypeScript is
134 Note that there's a cutoff - TypeScript doesn't go arbit
464 like to extend our thanks to [Wenlu Wang](https://github.com/King
470 anks to work in part by [Song Gao](https://github.com/ShuiRuTia
470 t/TypeScript/pull/44157) with colors and other visual separation.
514 o extend our thanks to [David Michon](https://github.com/dmichon-m
544 This feature was built by [Wenlu Wang](https://github.com/King
546 Wenlu also contributed [the integra
620 ### Broader Always-Truthy Promise Checks
622 TypeScript introduced "Always Truthy Promise checks" to catch code

Typos for TypeScript 4.2.md

Line Typo
158 r external contributor [Jonas Hübotter](https://github.com/jonhue) f
233 ke to extend a big thanks to [Wenlu Wang](https://github.com/King
265 ure this restriction in new-ing up abstract classes is cons
421 rther improvements from [Alex Tarasyuk](https://github.com/a-tarasyu
441 ## Destructured Variables Can Be Explicitly M
443 other pull request from [Alex Tarasyuk](https://github.com/a-tarasyu
443 a-tarasyuk), you can now mark destructured variables as unused by prefix
467 optional object properties as unassignable to otherwise compatible index
520 t/pull/41215) from [Alexander Tarasyuk](https://github.com/a-tarasyu
573 ser will parse them in a more spec-compliant way.
664 If you do want a template string expres

Typos for TypeScript 4.1.md

Line Typo
305 rying to model numbers in the Collatz conjecture or Fibonacci seque
416 ports, often it's to simulate monorepo linking behavior.
469 ## Editor Support for the JSDoc @see Tag
471 The JSDoc tag @see tag now has better
473 tion on first or C in the JSDoc comment just works in the fol
488 anks to frequent contributor [Wenlu Wang](https://github.com/King
502 /unknown` Are Propagated in Falsy Positions
583 ...foo }`) don't operate over falsy values.
625 This modeled exactly how the operation wou
651 This means that some cases of assignability will now fail, but it also me

Typos for TypeScript 4.0.md

Line Typo
8 ## Variadic Tuple Types
118 By combining both of these behaviors together, we can write a sing
187 Variadic tuple types enable a lot of n
189 ft/TypeScript/pull/39094) for variadic tuples.
191 ## Labeled Tuple Elements
242 re are a few rules when using labeled tuples.
243 For one, when labeling a tuple element, all other el
243 nts in the tuple must also be labeled.
266 Overall, labeled tuples are handy when taking
271 ft/TypeScript/pull/38234) for labeled tuple elements.
372 logical and (&&), logical or (`
372 &), logical _or_ (
447 g thanks to community member [Wenlu Wang](https://github.com/King
471 type-safety which could have errored on invalid operations.
559 g thanks to community member [Noj Vek](https://github.com/nojve
559 anks to community member [Noj Vek](https://github.com/nojvek) f
587 he SDK installers above] and [MSBuild installs](https://www.nuget.o
590 learn more about whether your favorite editor has support to use new
595 -3-7/#optional-chaining) and [nullish coalescing](https://devblogs.
599 to subtleties with truthiness/falsiness in JavaScript, we believe it
605 d with a /** @deprecated */ JSDoc comment.
611 ality is available thanks to [Wenlu Wang](https://github.com/King
614 ### Partial Semantic Mode at Startup
616 rom users suffering from long startup times, especially on bigger p

Typos for Advanced Types.md

Line Typo
203 These _typeof type guards_ are reco
203 These typeof type **guards** are recognized in two differe
210 _instanceof type guards_ are
210 instanceof type **guards** are a way of narrowing types
211 orrow our industrial strength string-padder example from earlier:
266 The inventor of null, Tony Hoare, calls this his ["billion dol
444 const bear = getBear()
444 const bear = getBear()
445 bear.name
446 bear.honey
458 const bear = getBear();
458 const bear = getBear();
459 bear.name;
460 bear.honey;
474 const src = 'const a = "Hello World
474 const src = 'const a = "Hello World"';
474 const src = 'const a = "Hello World"';
475 window.ts.transpileModule(src, {});
475 window.ts.transpileModule(src, {});
498 ## Enum Member Types
500 mentioned in [our section on enums](./enums.html#union-enums-and
500 enums-and-enum-member-types), enum members have types when every
502 pes", we're referring to both enum member types as well as numer
507 This is called F-bounded polymorphism, a lot of people
716 Or we might want a readonly version:
822 example, if Person.name was readonly, Partial<Person>.name would
822 artial.name` would be readonly and optional.
867 as an index to an object. In otherwords, keyof any is currently equ

Typos for Compiler Options.md

Line Typo
57 --generateTrace
75 --init
84 --listFilesOnly
111 --showConfig
163 r deleted, if specified with '--clean')

214 /tsconfig/#fallbackPolling'>--fallbackPolling
215 e>fixedinterval, priorityinterval, dynamicpriority
215 riorityinterval, dynamicpriority, or fixedchunksi
223 #synchronousWatchDirectory'>--synchronousWatchDirectory
228 ry watchers on platforms that don`t support recursive watching natively.

1480 sconfig.json`](/docs/handbook/tsconfig-json.html) files.
1481 - Learn how to work in an [MSBuild project](/docs/handbook/compi

Typos for Narrowing.md

Line Typo
45 Much like how TypeScript analyzes runtime values using static t
48 that our programs can take to analyze the most specific possible ty
159 bove by checking if strs is truthy.
187 ire body of the function in a truthy check, but this has a subtle
352 h - is `string
386 TypeScript was able to analyze this code and see that the re
390 When a variable is analyzed, control flow can split off a
488 Circles keep track of their radiuses and squares keep track of the
583 We need to communicate what we know to the type checker.

Typos for More on Functions.md

Line Typo
131 For example, a standalone version of map would look l
395 this actually means is that _callback might get invoked w
395 k` might get invoked with one argument_.
432 a Date that takes either a timestamp (one argument) or a month/day
517 value that might be a string or an array, because TypeScript
796 ## Assignability of Functions
867 - [v1 handbook](https://www.typescr

Typos for Everyday Types.md

Line Typo
40 t a particular value to cause typechecking errors.
406 const bear = getBear()
406 const bear = getBear()
407 bear.name
408 bear.honey
420 const bear = getBear();
420 const bear = getBear();
421 bear.name;
422 bear.honey;
434 ts: TypeScriptAPI
436 const src = 'const a = "Hello World
436 const src = 'const a = "Hello World"';
436 const src = 'const a = "Hello World"';
437 window.ts.transpileModule(src, {});
437 window.ts.transpileModule(src, {});
447 ts: TypeScriptAPI
648 ](/tsconfig#strictNullChecks) on, when a value is null or `u
675 ## Enums
677 Enums are a feature added to JavaSc
677 sure. You can read more about enums in the [Enum reference page](
677 read more about enums in the [Enum reference page](/docs/handboo
698 You can learn more about BigInt in [the TypeScript 3.2 releas

Typos for Basic Types.md

Line Typo
21 The most basic datatype is the simple true/false valu
29 ther floating point values or BigIntegers.
30 get the type number, while BigIntegers get the type bigint.
44 ng programs in JavaScript for webpages and servers alike is working
45 ng` to refer to these textual datatypes.
55 re surrounded by the backtick/backquote (`) character, and embe
135 ## Enum
137 dition to the standard set of datatypes from JavaScript is the enum
138 As in languages like C#, an enum is a way of giving more frien
149 By default, enums begin numbering their members
162 lly set all the values in the enum:
173 A handy feature of enums is that you can also go from
173 the name of that value in the enum.
174 that mapped to in the Color enum above, we could look up the c
314 able to, every type; however, no type is a subtype of, or assi

Generated by 🚫 dangerJS against 83ad39a

@github-actions
Copy link
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-glacier-09aa73710-2759.centralus.azurestaticapps.net

@andrewbranch andrewbranch merged commit afc5504 into v2 Mar 31, 2023
@andrewbranch andrewbranch deleted the 5.0-options branch March 31, 2023 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants