Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/documentation/copy/en/javascript/JSDoc Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ myPet.name;
import types can be used to get the type of a value from a module if you don't know the type, or if it has a large type that is annoying to type:

```js twoslash
// @types: node
// @filename: accounts.d.ts
export const userAccount = {
name: "Name",
Expand Down Expand Up @@ -746,6 +747,7 @@ Otherwise, `@example` will be parsed as a new tag.
### Other supported patterns

```js twoslash
// @types: react
class Foo {}
// ---cut---
var someObj = {
Expand Down
6 changes: 6 additions & 0 deletions packages/typescriptlang-org/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ if (process.env.BOOTSTRAPPING) {

require("./scripts/ensureDepsAreBuilt")

const ts = require("typescript");

// https://github.com/gatsbyjs/gatsby/issues/1457
require("ts-node").register({ files: true })
const { join } = require("path")
Expand Down Expand Up @@ -158,6 +160,10 @@ module.exports = {
defaultOptions: {
noErrorValidation: true,
},
defaultCompilerOptions: {
types: [],
target: ts.ScriptTarget.ES2020,
},
},
},
"gatsby-remark-copy-linked-files",
Expand Down
Loading