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

chore(util): update list of suppressed JSDoc tags to align with Framework #3876

Merged
merged 4 commits into from
Dec 9, 2022
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
9 changes: 7 additions & 2 deletions src/utils/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import type * as d from '../declarations';
import { dashToPascalCase, isString, toDashCase } from './helpers';
import { buildError } from './message-utils';

const SUPPRESSED_JSDOC_TAGS: string[] = ['internal'];
/**
* A set of JSDoc tags which should be excluded from JSDoc comments
* included in output typedefs.
*/
const SUPPRESSED_JSDOC_TAGS: ReadonlyArray<string> = ['virtualProp', 'slot', 'part', 'internal'];

/**
* Create a stylistically-appropriate JS variable name from a filename
Expand Down Expand Up @@ -117,7 +121,8 @@ function formatDocBlock(docs: d.CompilerJsDoc, indentation: number = 0): string
}

/**
* Get all lines part of the doc block
* Get all lines which are part of the doc block
*
* @param docs the compiled JS docs
* @returns list of lines part of the doc block
*/
Expand Down
20 changes: 0 additions & 20 deletions test/end-to-end/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export namespace Components {
}
/**
* Component that helps display a list of cars
* @slot header - The slot for the header content.
* @part car - The shadow part to target to style the car.
*/
interface CarList {
"cars": CarData[];
Expand Down Expand Up @@ -52,9 +50,6 @@ export namespace Components {
}
interface PrerenderCmp {
}
/**
* @virtualProp mode - Mode
*/
interface PropCmp {
"first": string;
"lastName": string;
Expand Down Expand Up @@ -102,8 +97,6 @@ declare global {
};
/**
* Component that helps display a list of cars
* @slot header - The slot for the header content.
* @part car - The shadow part to target to style the car.
*/
interface HTMLCarListElement extends Components.CarList, HTMLStencilElement {
}
Expand Down Expand Up @@ -177,9 +170,6 @@ declare global {
prototype: HTMLPrerenderCmpElement;
new (): HTMLPrerenderCmpElement;
};
/**
* @virtualProp mode - Mode
*/
interface HTMLPropCmpElement extends Components.PropCmp, HTMLStencilElement {
}
var HTMLPropCmpElement: {
Expand Down Expand Up @@ -243,8 +233,6 @@ declare namespace LocalJSX {
}
/**
* Component that helps display a list of cars
* @slot header - The slot for the header content.
* @part car - The shadow part to target to style the car.
*/
interface CarList {
"cars"?: CarData[];
Expand Down Expand Up @@ -278,9 +266,6 @@ declare namespace LocalJSX {
}
interface PrerenderCmp {
}
/**
* @virtualProp mode - Mode
*/
interface PropCmp {
"first"?: string;
"lastName"?: string;
Expand Down Expand Up @@ -330,8 +315,6 @@ declare module "@stencil/core" {
"car-detail": LocalJSX.CarDetail & JSXBase.HTMLAttributes<HTMLCarDetailElement>;
/**
* Component that helps display a list of cars
* @slot header - The slot for the header content.
* @part car - The shadow part to target to style the car.
*/
"car-list": LocalJSX.CarList & JSXBase.HTMLAttributes<HTMLCarListElement>;
"dom-api": LocalJSX.DomApi & JSXBase.HTMLAttributes<HTMLDomApiElement>;
Expand All @@ -345,9 +328,6 @@ declare module "@stencil/core" {
"method-cmp": LocalJSX.MethodCmp & JSXBase.HTMLAttributes<HTMLMethodCmpElement>;
"path-alias-cmp": LocalJSX.PathAliasCmp & JSXBase.HTMLAttributes<HTMLPathAliasCmpElement>;
"prerender-cmp": LocalJSX.PrerenderCmp & JSXBase.HTMLAttributes<HTMLPrerenderCmpElement>;
/**
* @virtualProp mode - Mode
*/
"prop-cmp": LocalJSX.PropCmp & JSXBase.HTMLAttributes<HTMLPropCmpElement>;
"slot-cmp": LocalJSX.SlotCmp & JSXBase.HTMLAttributes<HTMLSlotCmpElement>;
"slot-cmp-container": LocalJSX.SlotCmpContainer & JSXBase.HTMLAttributes<HTMLSlotCmpContainerElement>;
Expand Down
12 changes: 0 additions & 12 deletions test/karma/test-app/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,6 @@ export namespace Components {
}
interface ShadowDomBasicRoot {
}
/**
* @virtualProp {string} colormode - The mode determines which platform styles to use.
*/
interface ShadowDomMode {
/**
* The mode determines which platform styles to use.
Expand Down Expand Up @@ -871,9 +868,6 @@ declare global {
prototype: HTMLShadowDomBasicRootElement;
new (): HTMLShadowDomBasicRootElement;
};
/**
* @virtualProp {string} colormode - The mode determines which platform styles to use.
*/
interface HTMLShadowDomModeElement extends Components.ShadowDomMode, HTMLStencilElement {
}
var HTMLShadowDomModeElement: {
Expand Down Expand Up @@ -1496,9 +1490,6 @@ declare namespace LocalJSX {
}
interface ShadowDomBasicRoot {
}
/**
* @virtualProp {string} colormode - The mode determines which platform styles to use.
*/
interface ShadowDomMode {
/**
* The mode determines which platform styles to use.
Expand Down Expand Up @@ -1822,9 +1813,6 @@ declare module "@stencil/core" {
"shadow-dom-array-root": LocalJSX.ShadowDomArrayRoot & JSXBase.HTMLAttributes<HTMLShadowDomArrayRootElement>;
"shadow-dom-basic": LocalJSX.ShadowDomBasic & JSXBase.HTMLAttributes<HTMLShadowDomBasicElement>;
"shadow-dom-basic-root": LocalJSX.ShadowDomBasicRoot & JSXBase.HTMLAttributes<HTMLShadowDomBasicRootElement>;
/**
* @virtualProp {string} colormode - The mode determines which platform styles to use.
*/
"shadow-dom-mode": LocalJSX.ShadowDomMode & JSXBase.HTMLAttributes<HTMLShadowDomModeElement>;
"shadow-dom-mode-root": LocalJSX.ShadowDomModeRoot & JSXBase.HTMLAttributes<HTMLShadowDomModeRootElement>;
"shadow-dom-slot-basic": LocalJSX.ShadowDomSlotBasic & JSXBase.HTMLAttributes<HTMLShadowDomSlotBasicElement>;
Expand Down