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

Start of a JS section #722

Merged
merged 10 commits into from
Jul 3, 2020
Merged

Start of a JS section #722

merged 10 commits into from
Jul 3, 2020

Conversation

orta
Copy link
Contributor

@orta orta commented Jun 30, 2020

Takes some of the disparate docs on JS + JSDoc + JS DTS and makes a section for them

TODO:

  • wrap up the en/Intro to JS with TS.md

@orta orta mentioned this pull request Jul 1, 2020
@orta
Copy link
Contributor Author

orta commented Jul 3, 2020

I forced myself to ship this by coupling critical twoslash and vfs fixes with it... Go me.

@orta orta merged commit 1f1aa4f into v2 Jul 3, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Jul 3, 2020

Messages
📖

Deployed to a PR branch - playground tsconfig old handbook

Got false positives?

Make changes to the global settings spellcheck.json in /artsy/peril-settings.

Typos for Intro to JS with TS.md

Line Typo
11 tal typing in JavaScript [via JSDoc](/docs/handbook/jsdoc-support
21 editors which have TypeScript plugins.
23 roviding Type Hints in JS via JSDoc
25 , they can be specified using JSDoc syntax.
27 JSDoc annotations come before a dec
37 nd the full list of supported JSDoc patterns [in JSDoc Supported
37 supported JSDoc patterns [in JSDoc Supported Types](/docs/handbo

Typos for CHANGELOG.md

Line Typo
4 - Improvements to @showEmit and @showEmittedFile
4 mprovements to @showEmit and @showEmittedFile
11 ge into being useful (they're un-ordered and un-prioritised.)
11 seful (they're un-ordered and un-prioritised.)
12 fe easier it also includes a "completionsPrefix" which is the substring betwe
47 y to set the defaults for the config
51 Initial public version of Twoslash. Good enough for using on the

Typos for Creating DTS files From JS.md

Line Typo
9 added support for generating .d.ts files from JavaScript using J
9 s files from JavaScript using JSDoc syntax.
11 cript, or having to maintain .d.ts files in your codebase.
12 TypeScript supports most JSDoc tags, you can find [the refer
14 ting up your Project to emit .d.ts files
16 To add creation of .d.ts files in your project, you wi
20 to generate the corresponding d.ts files for JS files
21 - (optional) Edit your package.json to reference the types
27 ### TSConfig
29 The TSConfig is a json5 file which configu
29 The TSConfig is a json5 file which configures both yo
54 ore about the options in the [tsconfig reference](/reference).
55 An alternative to using a TSConfig file is the CLI, this is the
55 is the CLI, this is the same behavior as a CLI command.
66 ## Editing the package.json
68 additional step for finding .d.ts files.
71
71
73
74
74
75
75
75 s": "./dist/main.js"
79
79
81
82
82
83
83
83 "main":"./dist/index.js"
83 n":"./dist/index.js"
87 like to write tests for your .d.ts files, try [tsd](https://gith
87 ts for your .d.ts files, try [tsd](https://github.com/SamVersch

Typos for Type Checking JavaScript Files.md

Line Typo
39 ation in the constructor with JSDoc to specify the type.
61 Before ES2015, Javascript used constructor functions in
78 ## CommonJS modules are supported
80 e, TypeScript understands the CommonJS module format.
94 The module support in Javascript is much more syntactically fo
107 And, for pre-ES2015 code, it can be used to simul
163 ike other special JS checking behaviors, this behavior can be changed
163 l JS checking behaviors, this behavior can be changed by specifying
163 an be changed by specifying a JSDoc type for the variable. For ex
194 optionality on parameters in pre-ES2015 Javascript, all function para
194 y on parameters in pre-ES2015 Javascript, all function parameters in `
214 JSDoc annotated functions are exclu
215 Use JSDoc optional parameter syntax (`[
231 ## Var-args parameter declaration inferre
233 plicitly considered to have a var-arg parameter (i.e. `(...arg: any
233 (...arg: any[]) => any`). Use JSDoc var-arg syntax to specify the
233 g: any[]) => any`). Use JSDoc var-arg syntax to specify the type of
248 ng generic type parameters in Javascript, an unspecified type paramete
265 Use JSDoc @augments to specify the ty
280 ### In JSDoc references
282 unspecified type argument in JSDoc defaults to any:
310 of the features available in JSDoc, see [the reference](/docs/ha

Typos for JSDoc Reference.md

Line Typo
9 when using JSDoc annotations to provide type i
24 meaning of the tag given at [jsdoc.app](https://jsdoc.app).
27 se [the playground to explore JSDoc support](/play?useJavaScript=
31 peScript declaration, or in a JSDoc "@typedef" tag).
31 declaration, or in a JSDoc "@typedef" tag).
32 You can use most JSDoc types and any TypeScript type
89 atures, using either standard JSDoc syntax or TypeScript syntax.
152 specific and differs from the JSDoc standard:
440 ow up in JS codebases with [a JSConfig](/docs/handbook/tsconfig-json
462 When Javascript classes extend a generic base
478 nlike most object literals in Javascript, it does not allow other memb
491 However, unlike TypeScript's enums, @enum can have any type:
623 Unlike JSDoc's type system, TypeScript only
624 There is no explicit non-nullability -- if strictNullChecks is on,
624 xplicit non-nullability -- if strictNullChecks is on, then number is not n
629 cript ignores any unsupported JSDoc tags.

Generated by 🚫 dangerJS against 1505a4a

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.

1 participant