diff --git a/docs/src/components/InterfaceTable.ts b/docs/src/components/InterfaceTable.ts index 87daa75..97fefcf 100644 --- a/docs/src/components/InterfaceTable.ts +++ b/docs/src/components/InterfaceTable.ts @@ -1,7 +1,7 @@ import m from 'mithril'; import { IDocumentationData } from '..'; import { Table, Popover } from '@/'; -import { ITsInterface, ITsProperty, Kind } from 'documentalist/dist/client'; +import { ITsInterface, ITsProperty } from 'documentalist/dist/client'; export interface IInterfaceTableAttrs { data: IDocumentationData; @@ -38,7 +38,7 @@ function renderPropRow(prop: ITsProperty, data: IDocumentationData) { function renderPropType(prop: ITsProperty, data: IDocumentationData) { const { type, defaultValue } = prop; const typeDetails = data.docs.typescript[type]; - const isPopover = typeDetails && typeDetails.kind === Kind.Enum; + const isPopover = typeDetails && typeDetails.kind === 'enum'; const trigger = m('.Docs-interface-type', { class: isPopover ? 'is-popover' : '' }, [ type, @@ -49,7 +49,7 @@ function renderPropType(prop: ITsProperty, data: IDocumentationData) { ? m(Popover, { class: 'Docs-interface-popover', content: [ - typeDetails.kind === Kind.Enum && typeDetails.members.map((member, index) => [ + typeDetails.kind === 'enum' && typeDetails.members.map((member, index) => [ m('span.Docs-interface-member', `${member.defaultValue}`), (index !== typeDetails.members.length - 1) && m('span', '|') ]) diff --git a/docs/src/index.ts b/docs/src/index.ts index b39a6ed..9fcb576 100644 --- a/docs/src/index.ts +++ b/docs/src/index.ts @@ -3,7 +3,7 @@ import './style.scss'; import './favicon.ico'; import m from 'mithril'; import Main from './components/Main'; -import { IMarkdownPluginData, ITypescriptPluginData, Kind } from 'documentalist/dist/client'; +import { IMarkdownPluginData, ITypescriptPluginData } from 'documentalist/dist/client'; import { highlightCode } from './utils/highlightCode'; type Data = IMarkdownPluginData & ITypescriptPluginData; @@ -60,7 +60,7 @@ function normalizeDocs(data: Data) { Object.keys(data.typescript).map(key => { const prop = data.typescript[key]; - if (prop.kind === Kind.Interface || prop.kind === Kind.Class) { + if (prop.kind === 'interface' || prop.kind === 'class') { prop.properties.sort((a, b) => { const textA = a.name; const textB = b.name; @@ -74,7 +74,7 @@ function normalizeDocs(data: Data) { }); } - if (prop.kind === Kind.Enum) { + if (prop.kind === 'enum') { prop.members = prop.members .filter(member => !member.name.includes('NONE') && !member.name.includes('DEFAULT')); }