Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: include enums in typedoc index #1162

Merged
merged 1 commit into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/docs/type-indexer-plugin.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const MODELS = [
'Function',
'Type alias',
'Variable',
'Class'
'Class',
'Enumeration'
]

/**
Expand Down
6 changes: 6 additions & 0 deletions test/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ describe('docs', () => {
it('should exclude definitions from node_modules', async function () {
expect(fs.existsSync(join(projectDir, '.docs', 'modules', '_internal_.EventEmitter.html'))).to.be.false('included type from node_modules/@types/node')
})

it('should include definitions for enums', async function () {
const typedocUrls = await fs.readJSON(join(projectDir, 'dist', 'typedoc-urls.json'))

expect(typedocUrls).to.have.property('AnEnum')
})
})

describe('monorepo project', () => {
Expand Down
5 changes: 5 additions & 0 deletions test/fixtures/projects/a-ts-project/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ export interface UsesInternalType extends UsedButNotExported {
export interface ExtendsEmitter extends EventEmitter {

}

export enum AnEnum {
VALUE_1 = 0,
VALUE_2
}