diff --git a/docs/src/docPages/guide/working-with-typescript.md b/docs/src/docPages/guide/working-with-typescript.md index a7aed418..0e4a1a01 100644 --- a/docs/src/docPages/guide/working-with-typescript.md +++ b/docs/src/docPages/guide/working-with-typescript.md @@ -14,7 +14,7 @@ If you’re using TypeScript in your project and want to extend tiptap, there ar ## Options type To extend or create default options for an extension, you’ll need to define a custom type, here is an example: -```js +```ts import { Extension } from '@tiptap/core' export interface CustomExtensionOptions { @@ -31,7 +31,7 @@ const CustomExtension = Extension.create({ ## Command type The core package also exports a `Command` type, which needs to be added to all commands that you specify in your code. Here is an example: -```js +```ts import { Command, Extension } from '@tiptap/core' const CustomExtension = Extension.create({ diff --git a/docs/src/main.js b/docs/src/main.js index c1966e16..2257fc1d 100644 --- a/docs/src/main.js +++ b/docs/src/main.js @@ -1,6 +1,7 @@ // eslint-disable-next-line import Prism from 'prismjs' import 'prismjs/components/prism-jsx.js' +import 'prismjs/components/prism-typescript.js' import 'prismjs/components/prism-scss.js' import PortalVue from 'portal-vue' import App from '~/layouts/App'