{"name":"gatsby-plugin-typescript","version":"5.16.0","keywords":["gatsby","gatsby-plugin","typescript"],"author":{"name":"Kyle Mathews","email":"mathews.kyle@gmail.com"},"license":"MIT","_id":"gatsby-plugin-typescript@5.16.0","maintainers":[{"name":"pieh","email":"misiek.piechowiak@gmail.com"},{"name":"kathmbeck","email":"katherine.beck@netlify.com"},{"name":"serhalp-netlify","email":"philippe.serhal@netlify.com"},{"name":"mlgualtieri-gatsby","email":"mike.gualtieri@netlify.com"},{"name":"fk","email":"sechskilo@gmail.com"},{"name":"tylerbarnes","email":"tylerdbarnes@gmail.com"},{"name":"daniellewgatsby","email":"daniel.lew@gatsbyjs.com"}],"contributors":[{"name":"Noah Lange","email":"noahrlange@gmail.com"}],"homepage":"https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-typescript#readme","bugs":{"url":"https://github.com/gatsbyjs/gatsby/issues"},"dist":{"shasum":"9b696beec43c807e3946c6f715b73b9790d7cd4d","tarball":"http://registry-npm.ywwl.com/gatsby-plugin-typescript/download/gatsby-plugin-typescript-5.16.0.tgz","fileCount":7,"integrity":"sha512-+eE2mfmNU+AxnSCBIFU1oJIETMpfvAsBywFDPwtwDLlNl7GyQnvv0kz2OvR+jG8kjlUwBrR+71LJCg8Ydc5CSw==","signatures":[{"sig":"MEUCIE9GwVV+HjvSAbJOZmQm8+ObDxFeARq94Cl7OaQ/eqhIAiEA6cR4urcYZogo2cf2swb5KS2wPK0sJBR+uJ9AWgAaTQA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56126,"size":8935,"noattachment":false,"key":"/gatsby-plugin-typescript/-/gatsby-plugin-typescript-5.16.0.tgz"},"main":"index.js","engines":{"node":">=18.0.0 <26"},"gitHead":"92d6c67dcf10b641adf5fcc81ebeec5f50b75e40","scripts":{"build":"babel src --out-dir . --ignore \"**/__tests__\"","watch":"babel -w src --out-dir . --ignore \"**/__tests__\"","prepare":"cross-env NODE_ENV=production npm run build"},"_npmUser":{"name":"serhalp-netlify","email":"philippe.serhal@netlify.com"},"repository":{"url":"git+https://github.com/gatsbyjs/gatsby.git","type":"git","directory":"packages/gatsby-plugin-typescript"},"_npmVersion":"lerna/3.22.1/node@v22.19.0+arm64 (darwin)","description":"Adds TypeScript support to Gatsby","directories":{},"_nodeVersion":"22.19.0","dependencies":{"@babel/core":"^7.20.12","@babel/runtime":"^7.20.13","@babel/preset-typescript":"^7.18.6","babel-plugin-remove-graphql-queries":"^5.16.0","@babel/plugin-proposal-numeric-separator":"^7.18.6","@babel/plugin-proposal-optional-chaining":"^7.20.7","@babel/plugin-proposal-nullish-coalescing-operator":"^7.18.6"},"_hasShrinkwrap":false,"devDependencies":{"cross-env":"^7.0.3","@babel/cli":"^7.20.7","@babel/core":"^7.20.12","babel-preset-gatsby-package":"^3.16.0"},"peerDependencies":{"gatsby":"^5.0.0-next"},"_npmOperationalInternal":{"tmp":"tmp/gatsby-plugin-typescript_5.16.0_1769459244713_0.3167453933344715","host":"s3://npm-registry-packages-npm-production"},"readme":"# gatsby-plugin-typescript\n\nAllows Gatsby to build TypeScript and TSX files. Does NOT run type checking during build (see Caveats).\n\nThis plugin is automatically included in Gatsby. The only reason you would need to explicitly use this plugin is if you need to configure its options.\n\n## How to customize usage\n\n1.  Include the plugin in your `gatsby-config.js` file with the specific options\n1.  Write your components in TSX or TypeScript.\n1.  Run TypeScript directly or with a build tool.\n1.  You're good to go.\n\n> When [creating pages programmatically](/docs/programmatically-create-pages-from-data/#creating-pages), you can pass the `.tsx` filename directly as the `component` for [`createPage`](/docs/actions/#createPage).\n\n_**Please note**: If packages don't ship with TypeScript definitions you'll need to manually install those type definitions, e.g. for React. A typical Gatsby project would need: `npm install --save-dev @types/react @types/react-dom @types/node`_\n\n## Options\n\nWhen adding this plugin to your `gatsby-config.js`, you can pass in options to override the default [@babel/preset-typescript](https://babeljs.io/docs/en/babel-preset-typescript#options) config.\n\n```javascript\n// gatsby-config.js\nmodule.exports = {\n  plugins: [\n    {\n      resolve: `gatsby-plugin-typescript`,\n      options: {\n        isTSX: true, // defaults to false\n        jsxPragma: `jsx`, // defaults to \"React\"\n        allExtensions: true, // defaults to false\n      },\n    },\n  ],\n}\n```\n\nFor more detailed documentation on the available options, visit https://babeljs.io/docs/en/babel-preset-typescript#options.\nTo add TypeScript Babel plugins (e.g. `@babel/plugin-proposal-decorators`), you can try using a [custom .babelrc file](https://www.gatsbyjs.com/docs/babel/#how-to-use-a-custom-babelrc-file).\n\n## Caveats\n\nThis plugin uses [`babel-plugin-transform-typescript`](https://babeljs.io/docs/en/babel-plugin-transform-typescript.html)\nto transpile TypeScript. It does _not do type checking_. Also since the TypeScript\ncompiler is not involved, the following applies:\n\n> Does not support namespaces.\n> Workaround: Move to using file exports, or\n> migrate to using the module { } syntax instead.\n>\n> Does not support const enums because those require\n> type information to compile. Workaround: Remove the\n> const, which makes it available at runtime.\n>\n> Does not support export = and import =, because those\n> cannot be compiled to ES.next. Workaround: Convert\n> to using export default and export const,\n> and import x, {y} from \"z\".\n>\n> Does not support baseUrl.\n> Workaround: use [gatsby-plugin-root-import](https://www.gatsbyjs.com/plugins/gatsby-plugin-root-import/)\n> and configure it to point the baseUrl value (also set baseUrl option in tsconfig.json file).\n\nhttps://babeljs.io/docs/en/babel-plugin-transform-typescript.html\n\n## Type checking\n\nFirst of all you should set up your IDE so that type errors are surfaced.\nVisual Studio Code is very good in this regard.\n\nIn addition, you can see the instructions in [TypeScript-Babel-Starter](https://github.com/Microsoft/TypeScript-Babel-Starter)\nfor setting up a `type-check` task.\n","publish_time":1769459244845,"_cnpm_publish_time":1769459244845,"dist-tags":{"alpha-9689ff":"4.23.0-alpha-9689ff.25","alpha-a5-peer":"4.23.0-alpha-a5-peer.70","alpha-gatsby-metadata":"4.17.0-alpha-gatsby-metadata.81","alpha-mdx-v2":"4.18.0-alpha-mdx-v2.68","alpha-qe-sm":"3.14.0-alpha-qe-sm.33","alpha-remote-fetch":"3.14.0-alpha-remote-fetch.79","alpha-remote-file":"3.10.0-alpha-remote-file.48","alpha-rspack":"5.8.0-alpha-rspack.16","alpha-trailing-slash":"4.5.0-alpha-trailing-slash.71","alpha-transformer-json":"4.14.0-alpha-transformer-json.26","alpha-ts-jit":"4.6.0-alpha-ts-jit.27","alpha-v5":"5.0.0-alpha-v5.d20221012t101120.57","cbp3":"3.0.0-cpb3.83","coreutils":"3.12.0-coreutils.29","debug-missing-sq":"2.4.19-debug-missing-sq.231","dev-ssr-2":"2.4.19-dev-ssr-2.196","drupal-next":"3.14.0-drupal-next.81","drupal-proxyurl":"5.0.0-alpha-drupal-proxyurl.14","drupal-self-reference":"4.18.0-alpha-drupal-self-reference.18","functions-next":"3.4.0-functions-next.18","image-cdn":"4.9.0-alpha-image-service2.14","image-service":"4.8.0-alpha-image-service.35","latest":"5.16.0","latest-v3":"3.15.0","latest-v4":"4.25.0","mdxv4-rc":"4.20.0-mdxv4-rc.65","next":"5.17.0-next.0","otp-test":"2.1.6-otp-test.69","preview-gh-api":"4.23.0-alpha-preview-gh-api.26","query-modules-debug-missing-sq":"2.4.19-query-modules-debug-missing-sq.267","reach-router":"3.0.0-reach-router.17","react19":"5.17.0-react19.1","unifiedroutes":"2.3.3-unifiedroutes.76","unifiedroutes-v2":"2.3.3-unifiedroutes-v2.151","v3rc":"3.0.0-v3rc.0","wp-image-cdn-auth":"4.15.0-alpha-wp-image-cdn-auth.45"}}