Skip to content

Commit

Permalink
fix: export missing TS types
Browse files Browse the repository at this point in the history
  • Loading branch information
petyosi committed May 19, 2024
1 parent 1bab51b commit 1e30685
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 13 deletions.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,5 @@ export * from './utils/uuid4'
export * from './utils/voidEmitter'

export * from './RealmWithPlugins'

export * from './FormatConstants'
11 changes: 9 additions & 2 deletions src/plugins/image/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,17 @@ interface BaseImageParameters {
title?: string
}

interface FileImageParameters extends BaseImageParameters {
/**
* @group Image
*/
export interface FileImageParameters extends BaseImageParameters {
file: File
}
interface SrcImageParameters extends BaseImageParameters {

/**
* @group Image
*/
export interface SrcImageParameters extends BaseImageParameters {
src: string
}
/**
Expand Down
12 changes: 9 additions & 3 deletions src/plugins/jsx/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ export function isMdastJsxNode(node: Mdast.Nodes): node is MdastJsx {
return node.type === 'mdxJsxFlowElement' || node.type === 'mdxJsxTextElement'
}

interface ExpressionValue {
/**
* @group JSX
*/
export interface ExpressionValue {
type: 'expression'
value: string
}
Expand All @@ -120,7 +123,7 @@ const isExpressionValue = (value: string | ExpressionValue | null): value is Exp
return false
}

type JsxProperties = Record<string, string | ExpressionValue>
export type JsxProperties = Record<string, string | ExpressionValue>

const toMdastJsxAttributes = (attributes: JsxProperties) =>
Object.entries(attributes).map(
Expand Down Expand Up @@ -179,7 +182,10 @@ export const insertJsx$ = Signal<
)
})

interface JsxPluginParams {
/**
* @group JSX
*/
export interface JsxPluginParams {
/**
* A set of descriptors that document the JSX elements used in the document.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/toolbar/primitives/toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const SingleChoiceToggleGroup = <T extends string>({
contents: React.ReactNode
}[]
onChange: (value: T | '') => void
value: T
value: T | ''
className?: string
}) => {
return (
Expand Down
12 changes: 5 additions & 7 deletions typedoc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
{
"$schema": "https://typedoc.org/schema.json",
"entryPoints": [
"./src/index.ts",
],
"entryPoints": ["./src/index.ts"],
"out": "docs/api",
"plugin": [
"typedoc-plugin-markdown"
],
"plugin": ["typedoc-plugin-markdown"],
"watch": false,
"excludeExternals": true,
"excludePrivate": true,
Expand All @@ -15,6 +11,9 @@
"categorizeByGroup": true,
"disableSources": true,
"cleanOutputDir": true,
"hidePageHeader": true,
"propertiesFormat": "table",
"parametersFormat": "table",
"navigation": {
"includeGroups": true,
"includeCategories": true
Expand All @@ -24,7 +23,6 @@
"invalidLink": true,
"notDocumented": false
},
"allReflectionsHaveOwnDocument": true,
"hideBreadcrumbs": true,
"groupOrder": [
"MDXEditor",
Expand Down

0 comments on commit 1e30685

Please sign in to comment.