1- const { resolve } = require ( 'path' )
2- const {
3- linkDocblocks ,
4- transpileCodeblocks
5- } = require ( 'remark-typescript-tools' )
1+ import { resolve } from 'path'
2+ import { linkDocblocks , transpileCodeblocks } from 'remark-typescript-tools'
3+ import type { Options , ThemeConfig } from '@docusaurus/preset-classic'
4+ import type { Config } from '@docusaurus/types'
5+ import type { Options as UmamiOptions } from '@dipakparmar/docusaurus-plugin-umami'
66
7- module . exports = {
7+ const config : Config = {
88 title : 'Redux' ,
99 tagline :
1010 'A JS library for predictable and maintainable global state management' ,
@@ -162,10 +162,9 @@ module.exports = {
162162 algolia : {
163163 appId : 'YUQHC5OCW0' ,
164164 apiKey : 'ef8f3e604a1e7ed3afa4dbaeeecfa5f2' ,
165- indexName : 'redux' ,
166- algoliaOptions : { }
165+ indexName : 'redux'
167166 }
168- } ,
167+ } satisfies ThemeConfig ,
169168 presets : [
170169 [
171170 '@docusaurus/preset-classic' ,
@@ -197,7 +196,7 @@ module.exports = {
197196 compilerSettings : {
198197 tsconfig : resolve ( __dirname , './tsconfig.json' ) ,
199198 externalResolutions : { } ,
200- transformVirtualFilepath : path =>
199+ transformVirtualFilepath : ( path : string ) =>
201200 path . replace ( '/docs/' , '/website/' )
202201 }
203202 }
@@ -207,21 +206,22 @@ module.exports = {
207206 theme : {
208207 customCss : require . resolve ( './src/css/custom.css' )
209208 }
210- }
209+ } satisfies Options
211210 ]
212211 ] ,
213212 plugins : [
214213 [
215214 '@dipakparmar/docusaurus-plugin-umami' ,
216- /** @type {import('@dipakparmar/docusaurus-plugin-umami').Options } */
217- ( {
215+ {
218216 websiteID : '4bb3bf09-7460-453f-857d-874d8a361cb6' ,
219217 analyticsDomain : 'redux-docs-umami.up.railway.app' ,
220218 scriptName : 'script.js' ,
221219 dataAutoTrack : true ,
222220 dataDoNotTrack : true ,
223221 dataCache : true
224- } )
222+ } satisfies UmamiOptions
225223 ]
226224 ]
227225}
226+
227+ export default config
0 commit comments