Skip to content

Add InterfaceDeclaration #77

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Added an optional `"syntax"` field to CSSCustomProperty to describe the property syntax using CSS Properties and Values API's syntax strings. Fixes
https://github.com/webcomponents/custom-elements-manifest/issues/68

- Added InterfaceDeclaration. Fixes https://github.com/webcomponents/custom-elements-manifest/issues/76

<!-- ### Removed -->
### Fixed

Expand Down
31 changes: 30 additions & 1 deletion schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ export type Declaration =
| MixinDeclaration
| VariableDeclaration
| CustomElementDeclaration
| CustomElementMixinDeclaration;
| CustomElementMixinDeclaration
| InterfaceDeclaration;

/**
* A reference to an export of a module.
Expand Down Expand Up @@ -386,6 +387,34 @@ export interface TypeReference extends Reference {
end?: number;
}

/**
* An interface that describes the properties and methods of an object.
*/
export interface InterfaceDeclaration {
kind: 'interface';

name: string;

/**
* A markdown summary suitable for display in a listing.
*/
summary?: string;

/**
* A markdown description of the class.
*/
description?: string;

/**
* The interfaces that this interface extends.
*/
supertypes?: Array<Reference>;

members?: Array<ClassMember>;

source?: SourceReference;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw I still dont know what a SourceReference really is or how its supposed to be documented

I think the PR for SourceReferences was merged by you and Alexander, I added some comments after merging (because I had missed the PR), but I still dont really know. Would be nice to have some clarification

}

/**
* The common interface of classes and mixins.
*/
Expand Down