chore: refactored docs-util (#5876)
This commit is contained in:
1 parent
2d79eeeecc
commit
fde1e23995
21 files changed
+255
-162
No files matched your search
@@ -92,11 +92,14 @@ module.exports = {
|
|||||||
parserOptions: {
|
parserOptions: {
|
||||||
project: [
|
project: [
|
||||||
"./tsconfig.json",
|
"./tsconfig.json",
|
||||||
|
"./packages/react-docs-generator/tsconfig.json",
|
||||||
"./packages/scripts/tsconfig.json",
|
"./packages/scripts/tsconfig.json",
|
||||||
"./packages/typedoc-config/tsconfig.json",
|
"./packages/typedoc-config/tsconfig.json",
|
||||||
"./packages/typedoc-frontmatter-plugin/tsconfig.json",
|
"./packages/typedoc-plugin-custom/tsconfig.json",
|
||||||
"./packages/typedoc-modules-plugin/tsconfig.json",
|
"./packages/typedoc-markdown-medusa-plugin/tsconfig.json",
|
||||||
"./packages/typedoc-markdown-medusa-plugin/tsconfig.json"
|
"./packages/types/tsconfig.json",
|
||||||
|
"./packages/utils/tsconfig.json",
|
||||||
|
"./packages/workflows-diagrams-generator/tsconfig.json"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
|
|||||||
@@ -14,9 +14,5 @@ module.exports = getConfig({
|
|||||||
...globalTypedocOptions.exclude,
|
...globalTypedocOptions.exclude,
|
||||||
path.join(pathPrefix, "packages/medusa-js/src/resources/base.ts"),
|
path.join(pathPrefix, "packages/medusa-js/src/resources/base.ts"),
|
||||||
],
|
],
|
||||||
// internalModule: "internal",
|
|
||||||
ignoreApi: true,
|
ignoreApi: true,
|
||||||
// outputModules: false,
|
|
||||||
// outputNamespace: false,
|
|
||||||
// excludeReferences: true,
|
|
||||||
})
|
})
|
||||||
@@ -12,5 +12,8 @@
|
|||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"glob": "^10.3.10"
|
"glob": "^10.3.10"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"types": "*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,7 +14,7 @@ function getEntryPoints(entryPointPaths) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {Record<string, any>} param0 - The configuration options
|
* @param {Partial<import('typedoc').TypeDocOptions>} param0 - The configuration options
|
||||||
* @returns {import('typedoc').TypeDocOptions}
|
* @returns {import('typedoc').TypeDocOptions}
|
||||||
*/
|
*/
|
||||||
function getConfig({
|
function getConfig({
|
||||||
|
|||||||
@@ -15,11 +15,12 @@ export function load(app: Application) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
app.converter.on(Converter.EVENT_RESOLVE_BEGIN, (context: Context) => {
|
app.converter.on(Converter.EVENT_RESOLVE_BEGIN, (context: Context) => {
|
||||||
|
const isIgnoreApiEnabled = app.options.getValue("ignoreApi")
|
||||||
for (const reflection of context.project.getReflectionsByKind(
|
for (const reflection of context.project.getReflectionsByKind(
|
||||||
ReflectionKind.All
|
ReflectionKind.All
|
||||||
)) {
|
)) {
|
||||||
if (reflection.comment?.hasModifier("@apiIgnore")) {
|
if (reflection.comment?.hasModifier("@apiIgnore")) {
|
||||||
if (app.options.getValue("ignoreApi")) {
|
if (isIgnoreApiEnabled) {
|
||||||
context.project.removeReflection(reflection)
|
context.project.removeReflection(reflection)
|
||||||
} else {
|
} else {
|
||||||
reflection.comment.removeModifier(`@apiIgnore`)
|
reflection.comment.removeModifier(`@apiIgnore`)
|
||||||
|
|||||||
@@ -12,12 +12,6 @@ import {
|
|||||||
ParameterType,
|
ParameterType,
|
||||||
} from "typedoc"
|
} from "typedoc"
|
||||||
|
|
||||||
declare module "typedoc" {
|
|
||||||
export interface TypeDocOptionMap {
|
|
||||||
internalModule: string
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let hasMonkeyPatched = false
|
let hasMonkeyPatched = false
|
||||||
|
|
||||||
export function load(app: Application) {
|
export function load(app: Application) {
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
export declare module "typedoc" {
|
|
||||||
declare interface TypeDocOptionMap {
|
|
||||||
enableInternalResolve: boolean
|
|
||||||
internalModule: string
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -4,6 +4,5 @@
|
|||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"rootDir": "./src"
|
"rootDir": "./src"
|
||||||
},
|
},
|
||||||
"include": ["src", "src/types"],
|
"include": ["src"]
|
||||||
"typeRoots": ["./src/types/index.d.ts"]
|
|
||||||
}
|
}
|
||||||
@@ -23,6 +23,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^16.11.10",
|
"@types/node": "^16.11.10",
|
||||||
"copyfiles": "^2.4.1",
|
"copyfiles": "^2.4.1",
|
||||||
|
"types": "*",
|
||||||
"typescript": "5.2"
|
"typescript": "5.2"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ export default function () {
|
|||||||
Handlebars.registerHelper(
|
Handlebars.registerHelper(
|
||||||
"hasMoreThanOneSignature",
|
"hasMoreThanOneSignature",
|
||||||
function (model: DeclarationReflection) {
|
function (model: DeclarationReflection) {
|
||||||
return (model.signatures?.length || 0) > 1
|
return (model?.signatures?.length || 0) > 1
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
|
import { SectionKey } from "types"
|
||||||
import { MarkdownTheme } from "../../theme"
|
import { MarkdownTheme } from "../../theme"
|
||||||
import * as Handlebars from "handlebars"
|
import * as Handlebars from "handlebars"
|
||||||
import { SectionKey } from "../../types"
|
|
||||||
|
|
||||||
export default function (theme: MarkdownTheme) {
|
export default function (theme: MarkdownTheme) {
|
||||||
Handlebars.registerHelper(
|
Handlebars.registerHelper(
|
||||||
|
|||||||
@@ -20,12 +20,13 @@ import {
|
|||||||
registerPartials,
|
registerPartials,
|
||||||
} from "./render-utils"
|
} from "./render-utils"
|
||||||
import { formatContents } from "./utils"
|
import { formatContents } from "./utils"
|
||||||
import {
|
|
||||||
|
import type {
|
||||||
FormattingOptionType,
|
FormattingOptionType,
|
||||||
FormattingOptionsType,
|
FormattingOptionsType,
|
||||||
Mapping,
|
ParameterStyle,
|
||||||
ObjectLiteralDeclarationStyle,
|
} from "types"
|
||||||
} from "./types"
|
import { Mapping } from "./types"
|
||||||
|
|
||||||
export class MarkdownTheme extends Theme {
|
export class MarkdownTheme extends Theme {
|
||||||
allReflectionsHaveOwnDocument!: string[]
|
allReflectionsHaveOwnDocument!: string[]
|
||||||
@@ -44,7 +45,7 @@ export class MarkdownTheme extends Theme {
|
|||||||
out!: string
|
out!: string
|
||||||
publicPath!: string
|
publicPath!: string
|
||||||
preserveAnchorCasing!: boolean
|
preserveAnchorCasing!: boolean
|
||||||
objectLiteralTypeDeclarationStyle: ObjectLiteralDeclarationStyle
|
objectLiteralTypeDeclarationStyle: ParameterStyle
|
||||||
formattingOptions: FormattingOptionsType
|
formattingOptions: FormattingOptionsType
|
||||||
mdxOutput: boolean
|
mdxOutput: boolean
|
||||||
outputNamespace: boolean
|
outputNamespace: boolean
|
||||||
@@ -84,7 +85,7 @@ export class MarkdownTheme extends Theme {
|
|||||||
) as boolean
|
) as boolean
|
||||||
this.objectLiteralTypeDeclarationStyle = this.getOption(
|
this.objectLiteralTypeDeclarationStyle = this.getOption(
|
||||||
"objectLiteralTypeDeclarationStyle"
|
"objectLiteralTypeDeclarationStyle"
|
||||||
) as ObjectLiteralDeclarationStyle
|
) as ParameterStyle
|
||||||
this.formattingOptions = this.getOption(
|
this.formattingOptions = this.getOption(
|
||||||
"formatting"
|
"formatting"
|
||||||
) as FormattingOptionsType
|
) as FormattingOptionsType
|
||||||
|
|||||||
@@ -3,88 +3,12 @@ import {
|
|||||||
DeclarationReflection,
|
DeclarationReflection,
|
||||||
PageEvent,
|
PageEvent,
|
||||||
ParameterReflection,
|
ParameterReflection,
|
||||||
Reflection,
|
|
||||||
ReflectionKind,
|
ReflectionKind,
|
||||||
TypeParameterReflection,
|
TypeParameterReflection,
|
||||||
} from "typedoc"
|
} from "typedoc"
|
||||||
|
|
||||||
export type ParameterStyle = "table" | "list" | "component"
|
export type ParameterStyle = "table" | "list" | "component"
|
||||||
|
|
||||||
export type ReflectionTitleOptions = {
|
|
||||||
typeParameters?: boolean
|
|
||||||
kind?: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
export type ObjectLiteralDeclarationStyle = "table" | "list" | "component"
|
|
||||||
|
|
||||||
export type SectionKey =
|
|
||||||
| "comment"
|
|
||||||
| "member_declaration"
|
|
||||||
| "member_declaration_title"
|
|
||||||
| "member_declaration_comment"
|
|
||||||
| "member_declaration_typeParameters"
|
|
||||||
| "member_declaration_indexSignature"
|
|
||||||
| "member_declaration_signatures"
|
|
||||||
| "member_declaration_typeDeclaration"
|
|
||||||
| "member_declaration_example"
|
|
||||||
| "member_getteSetter_getSignature"
|
|
||||||
| "member_getteSetter_setSignature"
|
|
||||||
| "member_signatures"
|
|
||||||
| "member_getterSetter"
|
|
||||||
| "member_reference"
|
|
||||||
| "member_signature_title"
|
|
||||||
| "member_signature_comment"
|
|
||||||
| "member_signature_typeParameters"
|
|
||||||
| "member_signature_parameters"
|
|
||||||
| "member_signature_example"
|
|
||||||
| "member_signature_returns"
|
|
||||||
| "member_signature_declarationSignatures"
|
|
||||||
| "member_signature_declarationChildren"
|
|
||||||
| "member_signature_sources"
|
|
||||||
| "member_sources_implementationOf"
|
|
||||||
| "member_sources_inheritedFrom"
|
|
||||||
| "member_sources_overrides"
|
|
||||||
| "member_sources_definedIn"
|
|
||||||
| "members_group_categories"
|
|
||||||
| "members_categories"
|
|
||||||
| "title_reflectionPath"
|
|
||||||
| "reflection_comment"
|
|
||||||
| "reflection_typeParameters"
|
|
||||||
| "reflection_hierarchy"
|
|
||||||
| "reflection_implements"
|
|
||||||
| "reflection_implementedBy"
|
|
||||||
| "reflection_callable"
|
|
||||||
| "reflection_indexable"
|
|
||||||
|
|
||||||
export type FormattingOptionType = {
|
|
||||||
sections?: {
|
|
||||||
[k in SectionKey]: boolean
|
|
||||||
}
|
|
||||||
reflectionGroups?: {
|
|
||||||
[k: string]: boolean
|
|
||||||
}
|
|
||||||
reflectionTitle?: {
|
|
||||||
kind: boolean
|
|
||||||
typeParameters: boolean
|
|
||||||
suffix?: string
|
|
||||||
fullReplacement?: string
|
|
||||||
}
|
|
||||||
reflectionDescription?: string
|
|
||||||
expandMembers?: boolean
|
|
||||||
showCommentsAsHeader?: boolean
|
|
||||||
showCommentsAsDetails?: boolean
|
|
||||||
parameterStyle?: ParameterStyle
|
|
||||||
frontmatterData?: Record<string, unknown>
|
|
||||||
parameterComponent?: string
|
|
||||||
parameterComponentExtraProps?: Record<string, unknown>
|
|
||||||
mdxImports?: string[]
|
|
||||||
maxLevel?: number
|
|
||||||
}
|
|
||||||
|
|
||||||
export type FormattingOptionsType = {
|
|
||||||
[k: string]: FormattingOptionType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type ReflectionParameterType =
|
export type ReflectionParameterType =
|
||||||
| ParameterReflection
|
| ParameterReflection
|
||||||
| DeclarationReflection
|
| DeclarationReflection
|
||||||
@@ -107,57 +31,3 @@ export type Parameter = {
|
|||||||
expandable: boolean
|
expandable: boolean
|
||||||
children?: Parameter[]
|
children?: Parameter[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export class NavigationItem {
|
|
||||||
title: string
|
|
||||||
url: string
|
|
||||||
dedicatedUrls?: string[]
|
|
||||||
parent?: NavigationItem
|
|
||||||
children?: NavigationItem[]
|
|
||||||
isLabel?: boolean
|
|
||||||
isVisible?: boolean
|
|
||||||
isCurrent?: boolean
|
|
||||||
isModules?: boolean
|
|
||||||
isInPath?: boolean
|
|
||||||
reflection?: Reflection
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
title?: string,
|
|
||||||
url?: string,
|
|
||||||
parent?: NavigationItem,
|
|
||||||
reflection?: Reflection
|
|
||||||
) {
|
|
||||||
this.title = title || ""
|
|
||||||
this.url = url || ""
|
|
||||||
this.parent = parent
|
|
||||||
this.reflection = reflection
|
|
||||||
|
|
||||||
if (!url) {
|
|
||||||
this.isLabel = true
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.parent) {
|
|
||||||
if (!this.parent.children) {
|
|
||||||
this.parent.children = []
|
|
||||||
}
|
|
||||||
this.parent.children.push(this)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static create(
|
|
||||||
reflection: Reflection,
|
|
||||||
parent?: NavigationItem,
|
|
||||||
useShortNames?: boolean
|
|
||||||
) {
|
|
||||||
let name: string
|
|
||||||
if (useShortNames || (parent && parent.parent)) {
|
|
||||||
name = reflection.name
|
|
||||||
} else {
|
|
||||||
name = reflection.getFullName()
|
|
||||||
}
|
|
||||||
|
|
||||||
name = name.trim()
|
|
||||||
|
|
||||||
return new NavigationItem(name, reflection.url, parent, reflection)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -217,6 +217,7 @@ export function reflectionTableFormatter({
|
|||||||
reflectionType: parameter,
|
reflectionType: parameter,
|
||||||
collapse: "object",
|
collapse: "object",
|
||||||
wrapBackticks: true,
|
wrapBackticks: true,
|
||||||
|
getRelativeUrlMethod: Handlebars.helpers.relativeURL,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
+182
@@ -0,0 +1,182 @@
|
|||||||
|
export type SectionKey =
|
||||||
|
| "comment"
|
||||||
|
| "member_declaration"
|
||||||
|
| "member_declaration_title"
|
||||||
|
| "member_declaration_comment"
|
||||||
|
| "member_declaration_typeParameters"
|
||||||
|
| "member_declaration_indexSignature"
|
||||||
|
| "member_declaration_signatures"
|
||||||
|
| "member_declaration_typeDeclaration"
|
||||||
|
| "member_declaration_example"
|
||||||
|
| "member_getteSetter_getSignature"
|
||||||
|
| "member_getteSetter_setSignature"
|
||||||
|
| "member_signatures"
|
||||||
|
| "member_getterSetter"
|
||||||
|
| "member_reference"
|
||||||
|
| "member_signature_title"
|
||||||
|
| "member_signature_comment"
|
||||||
|
| "member_signature_typeParameters"
|
||||||
|
| "member_signature_parameters"
|
||||||
|
| "member_signature_example"
|
||||||
|
| "member_signature_returns"
|
||||||
|
| "member_signature_declarationSignatures"
|
||||||
|
| "member_signature_declarationChildren"
|
||||||
|
| "member_signature_sources"
|
||||||
|
| "member_sources_implementationOf"
|
||||||
|
| "member_sources_inheritedFrom"
|
||||||
|
| "member_sources_overrides"
|
||||||
|
| "member_sources_definedIn"
|
||||||
|
| "members_group_categories"
|
||||||
|
| "members_categories"
|
||||||
|
| "title_reflectionPath"
|
||||||
|
| "reflection_comment"
|
||||||
|
| "reflection_typeParameters"
|
||||||
|
| "reflection_hierarchy"
|
||||||
|
| "reflection_implements"
|
||||||
|
| "reflection_implementedBy"
|
||||||
|
| "reflection_callable"
|
||||||
|
| "reflection_indexable"
|
||||||
|
|
||||||
|
export type ParameterStyle = "table" | "list" | "component"
|
||||||
|
|
||||||
|
export type FormattingOptionsType = {
|
||||||
|
[k: string]: FormattingOptionType
|
||||||
|
}
|
||||||
|
|
||||||
|
export type FormattingOptionType = {
|
||||||
|
sections?: {
|
||||||
|
[k in SectionKey]: boolean
|
||||||
|
}
|
||||||
|
reflectionGroups?: {
|
||||||
|
[k: string]: boolean
|
||||||
|
}
|
||||||
|
reflectionTitle?: {
|
||||||
|
kind: boolean
|
||||||
|
typeParameters: boolean
|
||||||
|
suffix?: string
|
||||||
|
fullReplacement?: string
|
||||||
|
}
|
||||||
|
reflectionDescription?: string
|
||||||
|
expandMembers?: boolean
|
||||||
|
showCommentsAsHeader?: boolean
|
||||||
|
showCommentsAsDetails?: boolean
|
||||||
|
parameterStyle?: ParameterStyle
|
||||||
|
frontmatterData?: Record<string, unknown>
|
||||||
|
parameterComponent?: string
|
||||||
|
parameterComponentExtraProps?: Record<string, unknown>
|
||||||
|
mdxImports?: string[]
|
||||||
|
maxLevel?: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare module "typedoc" {
|
||||||
|
declare interface TypeDocOptionMap {
|
||||||
|
/**
|
||||||
|
* Enable resolving internal types.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
enableInternalResolve: boolean
|
||||||
|
/**
|
||||||
|
* The name of the internal module. Requires enabling `enableInternalResolve`.
|
||||||
|
* @defaultValue "internal"
|
||||||
|
*/
|
||||||
|
internalModule: string
|
||||||
|
/**
|
||||||
|
* Whether to remove reflections having the `@apiIgnore` tag.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
ignoreApi: boolean
|
||||||
|
/**
|
||||||
|
* The path to the ESLint configurations to apply.
|
||||||
|
*/
|
||||||
|
eslintPathName: string
|
||||||
|
/**
|
||||||
|
* The path to resolve plugins used in the ESLint configurations.
|
||||||
|
*/
|
||||||
|
pluginsResolvePath: string
|
||||||
|
/**
|
||||||
|
* An object of key-value pairs to be added to frontmatter
|
||||||
|
*/
|
||||||
|
frontmatterData: Record<string, unknown>
|
||||||
|
/**
|
||||||
|
* [Markdown Plugin] Do not render page title.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
hidePageTitle: boolean
|
||||||
|
/**
|
||||||
|
* [Markdown Plugin] Do not render breadcrumbs in template.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
hideBreadcrumbs: boolean
|
||||||
|
/**
|
||||||
|
* [Markdown Plugin] Specifies the base path that all links to be served from. If omitted all urls will be relative.
|
||||||
|
*/
|
||||||
|
publicPath: string
|
||||||
|
/**
|
||||||
|
* [Markdown Plugin] Use HTML named anchors as fragment identifiers for engines that do not automatically assign header ids. Should be set for Bitbucket Server docs.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
namedAnchors: boolean
|
||||||
|
/**
|
||||||
|
* [Markdown Plugin] Specify module names where all reflections are outputted into seperate files.
|
||||||
|
*/
|
||||||
|
allReflectionsHaveOwnDocument: string[]
|
||||||
|
/**
|
||||||
|
* [Markdown Plugin] Separator used to format filenames.
|
||||||
|
* @defaultValue "."
|
||||||
|
*/
|
||||||
|
filenameSeparator: string
|
||||||
|
/**
|
||||||
|
* [Markdown Plugin] The file name of the entry document.
|
||||||
|
* @defaultValue "README.md"
|
||||||
|
*/
|
||||||
|
entryDocument: string
|
||||||
|
/**
|
||||||
|
* [Markdown Plugin] Do not render in-page table of contents items.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
hideInPageTOC: boolean
|
||||||
|
/**
|
||||||
|
* [Markdown Plugin] Customise the index page title.
|
||||||
|
*/
|
||||||
|
indexTitle: string
|
||||||
|
/**
|
||||||
|
* [Markdown Plugin] Do not add special symbols for class members.
|
||||||
|
* @defaultValue true
|
||||||
|
*/
|
||||||
|
hideMembersSymbol: boolean
|
||||||
|
/**
|
||||||
|
* [Markdown Plugin] Preserve anchor casing when generating links.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
preserveAnchorCasing: boolean
|
||||||
|
/**
|
||||||
|
* [Markdown Plugin] Specify the Type Declaration Render Style
|
||||||
|
* @defaultValue table
|
||||||
|
*/
|
||||||
|
objectLiteralTypeDeclarationStyle: ParameterStyle
|
||||||
|
/**
|
||||||
|
* [Markdown Plugin] Formatting options that can be specified either on a specific document or to all documents
|
||||||
|
*/
|
||||||
|
formatting: FormattingOptionType
|
||||||
|
/**
|
||||||
|
* [Markdown Plugin] Whether outputted files should have an mdx extension.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
mdxOutput: boolean
|
||||||
|
/**
|
||||||
|
* [Markdown Plugin] The maximum level to expand when retrieving reflection types.
|
||||||
|
* @defaultValue 3
|
||||||
|
*/
|
||||||
|
maxLevel: number
|
||||||
|
/**
|
||||||
|
* [Markdown Plugin] Whether to output modules file for namespaces.
|
||||||
|
* @defaultValue true
|
||||||
|
*/
|
||||||
|
outputNamespace: boolean
|
||||||
|
/**
|
||||||
|
* [Markdown Plugin] Whether to output module files.
|
||||||
|
* @defaultValue true
|
||||||
|
*/
|
||||||
|
outputModules: boolean
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
// noop
|
||||||
|
module.exports = {}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"name": "types",
|
||||||
|
"private": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"build": "tsc",
|
||||||
|
"watch": "tsc --watch",
|
||||||
|
"lint": "eslint --ext .ts src"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"typedoc": "0.25.x"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"typescript": "5.2"
|
||||||
|
},
|
||||||
|
"version": "0.0.0",
|
||||||
|
"main": "./lib/index.js",
|
||||||
|
"types": "./lib/index.d.ts"
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../tsconfig",
|
||||||
|
"compilerOptions": {
|
||||||
|
"rootDir": "lib",
|
||||||
|
},
|
||||||
|
"include": ["lib/index.d.ts"]
|
||||||
|
}
|
||||||
@@ -154,6 +154,7 @@ export function getReflectionType({
|
|||||||
collapse,
|
collapse,
|
||||||
wrapBackticks = true,
|
wrapBackticks = true,
|
||||||
hideLink = false,
|
hideLink = false,
|
||||||
|
...options
|
||||||
}: TypeOptions<ReflectionParameterType>): string {
|
}: TypeOptions<ReflectionParameterType>): string {
|
||||||
if ("signatures" in model && model.signatures) {
|
if ("signatures" in model && model.signatures) {
|
||||||
return collapse === "function" || collapse === "all"
|
return collapse === "function" || collapse === "all"
|
||||||
@@ -163,6 +164,7 @@ export function getReflectionType({
|
|||||||
wrapBackticks,
|
wrapBackticks,
|
||||||
hideLink,
|
hideLink,
|
||||||
escape: !wrapBackticks,
|
escape: !wrapBackticks,
|
||||||
|
...options,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return collapse === "object" || collapse === "all"
|
return collapse === "object" || collapse === "all"
|
||||||
@@ -172,6 +174,7 @@ export function getReflectionType({
|
|||||||
wrapBackticks,
|
wrapBackticks,
|
||||||
hideLink,
|
hideLink,
|
||||||
escape: !wrapBackticks,
|
escape: !wrapBackticks,
|
||||||
|
...options,
|
||||||
})}${wrapBackticks ? "`" : ""}`
|
})}${wrapBackticks ? "`" : ""}`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -347,6 +350,7 @@ export function getReferenceType({
|
|||||||
wrapBackticks: false,
|
wrapBackticks: false,
|
||||||
hideLink,
|
hideLink,
|
||||||
escape: false,
|
escape: false,
|
||||||
|
getRelativeUrlMethod,
|
||||||
...options,
|
...options,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -10,7 +10,8 @@
|
|||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"rootDir": ".",
|
"rootDir": ".",
|
||||||
"allowJs": true
|
"allowJs": true,
|
||||||
|
"typeRoots": ["node_modules/@types", "./packages/types"]
|
||||||
},
|
},
|
||||||
"include": ["**/*.ts", "**/*.js"],
|
"include": ["**/*.ts", "**/*.js"],
|
||||||
"exclude": ["**/node_modules/**", "dist"]
|
"exclude": ["**/node_modules/**", "dist"]
|
||||||
|
|||||||
@@ -4417,6 +4417,7 @@ __metadata:
|
|||||||
resolution: "typedoc-config@workspace:packages/typedoc-config"
|
resolution: "typedoc-config@workspace:packages/typedoc-config"
|
||||||
dependencies:
|
dependencies:
|
||||||
glob: ^10.3.10
|
glob: ^10.3.10
|
||||||
|
types: "*"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
typedoc: 0.25.x
|
typedoc: 0.25.x
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
@@ -4463,6 +4464,7 @@ __metadata:
|
|||||||
"@types/node": ^16.11.10
|
"@types/node": ^16.11.10
|
||||||
copyfiles: ^2.4.1
|
copyfiles: ^2.4.1
|
||||||
handlebars: ^4.7.8
|
handlebars: ^4.7.8
|
||||||
|
types: "*"
|
||||||
typescript: 5.2
|
typescript: 5.2
|
||||||
utils: "*"
|
utils: "*"
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -4544,6 +4546,16 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"types@*, types@workspace:packages/types":
|
||||||
|
version: 0.0.0-use.local
|
||||||
|
resolution: "types@workspace:packages/types"
|
||||||
|
dependencies:
|
||||||
|
typescript: 5.2
|
||||||
|
peerDependencies:
|
||||||
|
typedoc: 0.25.x
|
||||||
|
languageName: unknown
|
||||||
|
linkType: soft
|
||||||
|
|
||||||
"typescript@npm:5.2":
|
"typescript@npm:5.2":
|
||||||
version: 5.2.2
|
version: 5.2.2
|
||||||
resolution: "typescript@npm:5.2.2"
|
resolution: "typescript@npm:5.2.2"
|
||||||
|
|||||||
Reference in new issue
Block a user