Skip to content

feat: add deprecated flag #89

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

Merged
merged 2 commits into from
Dec 7, 2021
Merged
Changes from 1 commit
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
60 changes: 60 additions & 0 deletions schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ export interface Package {
* An array of the modules this package contains.
*/
modules: Array<Module>;

/**
* Is this package deprecated? Provide a string to give a reason or migration instructions.
*/
deprecated?: boolean|string;
}

// This type may expand in the future to include JSON, CSS, or HTML
Expand Down Expand Up @@ -75,6 +80,11 @@ export interface JavaScriptModule {
* custom element definitions.
*/
exports?: Array<Export>;

/**
* Is this module deprecated? Provide a string to give a reason or migration instructions.
*/
deprecated?: boolean|string;
}

export type Export = JavaScriptExport | CustomElementExport;
Expand Down Expand Up @@ -102,6 +112,11 @@ export interface JavaScriptExport {
* defined and the `name` field must be `"*"`.
*/
declaration: Reference;

/**
* Is this export deprecated? Provide a string to give a reason or migration instructions.
*/
deprecated?: boolean|string;
}

/**
Expand All @@ -124,6 +139,11 @@ export interface CustomElementExport {
* custom element.
*/
declaration: Reference;

/**
* Is this export deprecated? Provide a string to give a reason or migration instructions.
*/
deprecated?: boolean|string;
}

export type Declaration =
Expand Down Expand Up @@ -226,6 +246,11 @@ export interface CustomElement extends ClassLike {
customElement: true;

members?: Array<CustomElementMember>;

/**
* Is this custom-element deprecated? Provide a string to give a reason or migration instructions.
*/
deprecated?: boolean|string;
}

export type CustomElementMember = CustomElementField | ClassMethod;
Expand Down Expand Up @@ -262,6 +287,11 @@ export interface Attribute {
* The name of the field this attribute is associated with, if any.
*/
fieldName?: string;

/**
* Is this attribute deprecated? Provide a string to give a reason or migration instructions.
*/
deprecated?: boolean|string;
}

export interface Event {
Expand All @@ -283,6 +313,11 @@ export interface Event {
type: Type;

inheritedFrom?: Reference;

/**
* Is this event deprecated? Provide a string to give a reason or migration instructions.
*/
deprecated?: boolean|string;
}

export interface Slot {
Expand All @@ -300,6 +335,11 @@ export interface Slot {
* A markdown description.
*/
description?: string;

/**
* Is this slot deprecated? Provide a string to give a reason or migration instructions.
*/
deprecated?: boolean|string;
}

/**
Expand All @@ -317,6 +357,11 @@ export interface CssPart {
* A markdown description.
*/
description?: string;

/**
* Is this part deprecated? Provide a string to give a reason or migration instructions.
*/
deprecated?: boolean|string;
}

export interface CssCustomProperty {
Expand Down Expand Up @@ -351,6 +396,11 @@ export interface CssCustomProperty {
* A markdown description.
*/
description?: string;

/**
* Is this property deprecated? Provide a string to give a reason or migration instructions.
*/
deprecated?: boolean|string;
}

export interface Type {
Expand Down Expand Up @@ -453,6 +503,11 @@ export interface ClassLike {
members?: Array<ClassMember>;

source?: SourceReference;

/**
* Is this class or mixin deprecated? Provide a string to give a reason or migration instructions.
*/
deprecated?: boolean|string;
}

export interface ClassDeclaration extends ClassLike {
Expand Down Expand Up @@ -481,6 +536,11 @@ export interface PropertyLike {
type?: Type;

default?: string;

/**
* Is this deprecated? Provide a string to give a reason or migration instructions.
*/
deprecated?: boolean|string;
}

export interface ClassField extends PropertyLike {
Expand Down