Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 68 additions & 2 deletions tests/theme/fixtures/input.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
/* eslint-disable */

export class OverloadedTest {
/**
* Class demonstrating Webpack as a parent class.
*/
export class WebpackTest {}

/**
* Class demonstrating overload signatures.
*/
export class OverloadTest {
/**
* First overload signature.
* @overload
Expand All @@ -21,5 +29,63 @@ export class OverloadedTest {
* @param {boolean} isEnabled A simple boolean parameter
* @returns {void}
*/
overloadedMethod(id, isEnabled) {}
overloadMethod(id, isEnabled) {}
}

/**
* Class demonstrating stability for deprecated, experimental, and legacy APIs.
*/
export class StabilityTest {
/**
* @deprecated Use the new API instead.
*/
deprecatedMethod() {}

/**
* @experimental
*/
experimentalMethod() {}

/**
* @legacy This is a legacy Webpack v4 API.
*/
legacyMethod() {}
}

/**
* Class demonstrating the formatting of JSDoc example blocks.
*/
export class ExamplesTest {
/**
* A sample method for the ExamplesTest class.
* @param {string} name A simple string parameter
* @returns {void}
* @example
* exampleMethod('example-1');
*
* @example
* ```ts
* exampleMethod('example-2');
* ```
*/
exampleMethod(name) {}
}

/**
* Class demonstrating properties and typed lists.
*/
export class TypedListTest extends WebpackTest {
/**
* A sample property for the TypedListTest class.
* @type {string}
*/
typedListProperty;

/**
* A sample method for the TypedListTest class.
* @param {string} name The name of the instance
* @param {number} count The count of items
* @returns {boolean} A boolean indicating success
*/
typedListMethod(name, count) {}
}
2 changes: 1 addition & 1 deletion tests/theme/theme.test.mjs.snapshot
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
exports[`TypeDoc Theme - Edge Cases Fixture 1`] = `
"# Class: \`webpack.js.org.OverloadedTest\`\\n\\n## Constructors\\n\\n### \`new OverloadedTest()\`\\n\\n* Returns: {OverloadedTest}\\n\\n## Methods\\n\\n### \`overloadedMethod(name, count)\`\\n\\n#### Call Signature\\n\\n* \`name\` {string} A simple string parameter\\n* \`count\` {number} A simple number parameter\\n* Returns: {void} \\n\\nFirst overload signature.\\n\\n#### Call Signature\\n\\n* \`isEnabled\` {boolean} A simple boolean parameter\\n* Returns: {string} \\n\\nSecond overload signature.\\n\\n#### Call Signature\\n\\n* \`id\` {number} A simple string parameter\\n* \`isEnabled\` {boolean} A simple boolean parameter\\n* Returns: {void} \\n\\nThird overload signature.\\n"
"# Class: \`webpack.js.org.ExamplesTest\`\\n\\nClass demonstrating the formatting of JSDoc example blocks.\\n\\n## Constructors\\n\\n### \`new ExamplesTest()\`\\n\\n* Returns: {ExamplesTest}\\n\\n## Methods\\n\\n### \`exampleMethod(name)\`\\n\\n* \`name\` {string} A simple string parameter\\n* Returns: {void} \\n\\nA sample method for the ExamplesTest class.\\n\`\`\`ts\\nexampleMethod('example-1');\\n\`\`\`\\n\\n\`\`\`ts\\nexampleMethod('example-2');\\n\`\`\`\\n\\n\\n---\\n\\n# Class: \`webpack.js.org.OverloadTest\`\\n\\nClass demonstrating overload signatures.\\n\\n## Constructors\\n\\n### \`new OverloadTest()\`\\n\\n* Returns: {OverloadTest}\\n\\n## Methods\\n\\n### \`overloadMethod(name, count)\`\\n\\n#### Call Signature\\n\\n* \`name\` {string} A simple string parameter\\n* \`count\` {number} A simple number parameter\\n* Returns: {void} \\n\\nFirst overload signature.\\n\\n#### Call Signature\\n\\n* \`isEnabled\` {boolean} A simple boolean parameter\\n* Returns: {string} \\n\\nSecond overload signature.\\n\\n#### Call Signature\\n\\n* \`id\` {number} A simple string parameter\\n* \`isEnabled\` {boolean} A simple boolean parameter\\n* Returns: {void} \\n\\nThird overload signature.\\n\\n\\n---\\n\\n# Class: \`webpack.js.org.StabilityTest\`\\n\\nClass demonstrating stability for deprecated, experimental, and legacy APIs.\\n\\n## Constructors\\n\\n### \`new StabilityTest()\`\\n\\n* Returns: {StabilityTest}\\n\\n## Methods\\n\\n### \`deprecatedMethod()\`\\n\\n> Stability: 0 - Deprecated: Use the new API instead.\\n\\n* Returns: {void}\\n\\n***\\n\\n### \`experimentalMethod()\`\\n\\n> Stability: 1 - Experimental\\n\\n* Returns: {void}\\n\\n**\`Experimental\`**\\n\\n***\\n\\n### \`legacyMethod()\`\\n\\n> Stability: 3 - Legacy: This is a legacy Webpack v4 API.\\n\\n* Returns: {void}\\n\\n\\n---\\n\\n# Class: \`webpack.js.org.TypedListTest\`\\n\\nClass demonstrating properties and typed lists.\\n\\n* Extends: {WebpackTest}\\n\\n## Constructors\\n\\n### \`new TypedListTest()\`\\n\\n* Returns: {TypedListTest}\\n\\n## Properties\\n\\n* \`typedListProperty\` {string} A sample property for the TypedListTest class.\\n\\n## Methods\\n\\n### \`typedListMethod(name, count)\`\\n\\n* \`name\` {string} The name of the instance\\n* \`count\` {number} The count of items\\n* Returns: {boolean} A boolean indicating success\\n\\nA sample method for the TypedListTest class.\\n\\n\\n---\\n\\n# Class: \`webpack.js.org.WebpackTest\`\\n\\nClass demonstrating Webpack as a parent class.\\n\\n## Constructors\\n\\n### \`new WebpackTest()\`\\n\\n* Returns: {WebpackTest}\\n"
`;