Skip to content

Commit

Permalink
fix: theme-json-schema.d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
jy95 committed Feb 13, 2023
1 parent 43e5ccf commit a563805
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
push:
branches:
- main
- alpha
- beta
jobs:
release:
name: Release
Expand Down
2 changes: 1 addition & 1 deletion .releaserc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"branches": ["main"]
"branches": ["main", {"name": "beta", "prerelease": true}, {"name": "alpha", "prerelease": true}]
}
12 changes: 6 additions & 6 deletions src/theme-json-schema.d.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
/// <reference types="@docusaurus/module-type-aliases" />

// Plugin config
declare module "docusaurus-json-schema-plugin" {
import type { Plugin } from "@docusaurus/types"
import type { PluginOptions } from "@src/index"

// No options for the time being
export default function themJSONSchema(): Plugin<undefined>
export default function themeJSONSchema(
options: PluginOptions
): Plugin<undefined>
}

// Viewer component
declare module "@theme/JSONSchemaViewer" {
import type { Props } from "./theme/JSONSchemaViewer/index"
import type { Props } from "@theme/JSONSchemaViewer/index"

export default function JSONSchemaViewer(props: Props): JSX.Element
}

// Editor component
declare module "@theme/JSONSchemaEditor" {
import type { Props } from "./theme/JSONSchemaEditor/index"
import type { Props } from "@theme/JSONSchemaEditor/index"

export default function JSONSchemaEditor(props: Props): JSX.Element
}
9 changes: 7 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,13 @@

/* Module Resolution Options */
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
/* Base directory to resolve non-absolute module names. */
"baseUrl": "./",
/* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
"paths": {
"@theme/*": ["./src/theme/*"],
"@src/*": ["./src/*"]
},
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
/* Type declaration files to be included in compilation. */
Expand Down

0 comments on commit a563805

Please sign in to comment.