Skip to content

Commit

Permalink
replace type aliases with interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanThatOneKid committed Apr 6, 2024
1 parent 4ffdd71 commit 74380ba
Show file tree
Hide file tree
Showing 66 changed files with 132 additions and 67 deletions.
3 changes: 2 additions & 1 deletion abbr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* AbbrElementProps are the props for the [`abbr`](https://developer.mozilla.org/docs/Web/HTML/Element/abbr) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/abbr>
*/
export type AbbrElementProps = GlobalAttributes;
export interface AbbrElementProps extends GlobalAttributes {
}

/**
* abbr renders the [`abbr`](https://developer.mozilla.org/docs/Web/HTML/Element/abbr) element.
Expand Down
3 changes: 2 additions & 1 deletion acronym.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { renderElement } from "./lib/mod.ts";
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/acronym>
* @deprecated
*/
export type AcronymElementProps = GlobalAttributes;
export interface AcronymElementProps extends GlobalAttributes {
}

/**
* acronym renders the [`acronym`](https://developer.mozilla.org/docs/Web/HTML/Element/acronym) element.
Expand Down
3 changes: 2 additions & 1 deletion address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* AddressElementProps are the props for the [`address`](https://developer.mozilla.org/docs/Web/HTML/Element/address) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/address>
*/
export type AddressElementProps = GlobalAttributes;
export interface AddressElementProps extends GlobalAttributes {
}

/**
* address renders the [`address`](https://developer.mozilla.org/docs/Web/HTML/Element/address) element.
Expand Down
3 changes: 2 additions & 1 deletion article.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* ArticleElementProps are the props for the [`article`](https://developer.mozilla.org/docs/Web/HTML/Element/article) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/article>
*/
export type ArticleElementProps = GlobalAttributes;
export interface ArticleElementProps extends GlobalAttributes {
}

/**
* article renders the [`article`](https://developer.mozilla.org/docs/Web/HTML/Element/article) element.
Expand Down
3 changes: 2 additions & 1 deletion aside.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* AsideElementProps are the props for the [`aside`](https://developer.mozilla.org/docs/Web/HTML/Element/aside) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/aside>
*/
export type AsideElementProps = GlobalAttributes;
export interface AsideElementProps extends GlobalAttributes {
}

/**
* aside renders the [`aside`](https://developer.mozilla.org/docs/Web/HTML/Element/aside) element.
Expand Down
3 changes: 2 additions & 1 deletion b.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* BElementProps are the props for the [`b`](https://developer.mozilla.org/docs/Web/HTML/Element/b) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/b>
*/
export type BElementProps = GlobalAttributes;
export interface BElementProps extends GlobalAttributes {
}

/**
* b renders the [`b`](https://developer.mozilla.org/docs/Web/HTML/Element/b) element.
Expand Down
3 changes: 2 additions & 1 deletion bdi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* BdiElementProps are the props for the [`bdi`](https://developer.mozilla.org/docs/Web/HTML/Element/bdi) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/bdi>
*/
export type BdiElementProps = GlobalAttributes;
export interface BdiElementProps extends GlobalAttributes {
}

/**
* bdi renders the [`bdi`](https://developer.mozilla.org/docs/Web/HTML/Element/bdi) element.
Expand Down
3 changes: 2 additions & 1 deletion bdo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* BdoElementProps are the props for the [`bdo`](https://developer.mozilla.org/docs/Web/HTML/Element/bdo) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/bdo>
*/
export type BdoElementProps = GlobalAttributes;
export interface BdoElementProps extends GlobalAttributes {
}

/**
* bdo renders the [`bdo`](https://developer.mozilla.org/docs/Web/HTML/Element/bdo) element.
Expand Down
3 changes: 2 additions & 1 deletion big.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { renderElement } from "./lib/mod.ts";
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/big>
* @deprecated
*/
export type BigElementProps = GlobalAttributes;
export interface BigElementProps extends GlobalAttributes {
}

/**
* big renders the [`big`](https://developer.mozilla.org/docs/Web/HTML/Element/big) element.
Expand Down
3 changes: 2 additions & 1 deletion center.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { renderElement } from "./lib/mod.ts";
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/center>
* @deprecated
*/
export type CenterElementProps = GlobalAttributes;
export interface CenterElementProps extends GlobalAttributes {
}

/**
* center renders the [`center`](https://developer.mozilla.org/docs/Web/HTML/Element/center) element.
Expand Down
3 changes: 2 additions & 1 deletion cite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* CiteElementProps are the props for the [`cite`](https://developer.mozilla.org/docs/Web/HTML/Element/cite) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/cite>
*/
export type CiteElementProps = GlobalAttributes;
export interface CiteElementProps extends GlobalAttributes {
}

/**
* cite renders the [`cite`](https://developer.mozilla.org/docs/Web/HTML/Element/cite) element.
Expand Down
4 changes: 2 additions & 2 deletions cli/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ if (import.meta.main) {
}),
});
} else {
sourceFile.addTypeAlias({
sourceFile.addInterface({
name: descriptor.propsInterfaceName,
isExported: true,
type: "GlobalAttributes",
extends: ["GlobalAttributes"],
docs: toDocs({
description:
`${descriptor.propsInterfaceName} are the props for the [\`${descriptor.tag}\`](${descriptor.see}) element.`,
Expand Down
3 changes: 2 additions & 1 deletion code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* CodeElementProps are the props for the [`code`](https://developer.mozilla.org/docs/Web/HTML/Element/code) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/code>
*/
export type CodeElementProps = GlobalAttributes;
export interface CodeElementProps extends GlobalAttributes {
}

/**
* code renders the [`code`](https://developer.mozilla.org/docs/Web/HTML/Element/code) element.
Expand Down
3 changes: 2 additions & 1 deletion datalist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* DatalistElementProps are the props for the [`datalist`](https://developer.mozilla.org/docs/Web/HTML/Element/datalist) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/datalist>
*/
export type DatalistElementProps = GlobalAttributes;
export interface DatalistElementProps extends GlobalAttributes {
}

/**
* datalist renders the [`datalist`](https://developer.mozilla.org/docs/Web/HTML/Element/datalist) element.
Expand Down
3 changes: 2 additions & 1 deletion dd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* DdElementProps are the props for the [`dd`](https://developer.mozilla.org/docs/Web/HTML/Element/dd) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/dd>
*/
export type DdElementProps = GlobalAttributes;
export interface DdElementProps extends GlobalAttributes {
}

/**
* dd renders the [`dd`](https://developer.mozilla.org/docs/Web/HTML/Element/dd) element.
Expand Down
3 changes: 2 additions & 1 deletion dfn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* DfnElementProps are the props for the [`dfn`](https://developer.mozilla.org/docs/Web/HTML/Element/dfn) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/dfn>
*/
export type DfnElementProps = GlobalAttributes;
export interface DfnElementProps extends GlobalAttributes {
}

/**
* dfn renders the [`dfn`](https://developer.mozilla.org/docs/Web/HTML/Element/dfn) element.
Expand Down
3 changes: 2 additions & 1 deletion dl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* DlElementProps are the props for the [`dl`](https://developer.mozilla.org/docs/Web/HTML/Element/dl) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/dl>
*/
export type DlElementProps = GlobalAttributes;
export interface DlElementProps extends GlobalAttributes {
}

/**
* dl renders the [`dl`](https://developer.mozilla.org/docs/Web/HTML/Element/dl) element.
Expand Down
3 changes: 2 additions & 1 deletion dt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* DtElementProps are the props for the [`dt`](https://developer.mozilla.org/docs/Web/HTML/Element/dt) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/dt>
*/
export type DtElementProps = GlobalAttributes;
export interface DtElementProps extends GlobalAttributes {
}

/**
* dt renders the [`dt`](https://developer.mozilla.org/docs/Web/HTML/Element/dt) element.
Expand Down
3 changes: 2 additions & 1 deletion em.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* EmElementProps are the props for the [`em`](https://developer.mozilla.org/docs/Web/HTML/Element/em) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/em>
*/
export type EmElementProps = GlobalAttributes;
export interface EmElementProps extends GlobalAttributes {
}

/**
* em renders the [`em`](https://developer.mozilla.org/docs/Web/HTML/Element/em) element.
Expand Down
3 changes: 2 additions & 1 deletion fencedframe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { renderElement } from "./lib/mod.ts";
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/fencedframe>
* @experimental
*/
export type FencedframeElementProps = GlobalAttributes;
export interface FencedframeElementProps extends GlobalAttributes {
}

/**
* fencedframe renders the [`fencedframe`](https://developer.mozilla.org/docs/Web/HTML/Element/fencedframe) element.
Expand Down
3 changes: 2 additions & 1 deletion figcaption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* FigcaptionElementProps are the props for the [`figcaption`](https://developer.mozilla.org/docs/Web/HTML/Element/figcaption) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/figcaption>
*/
export type FigcaptionElementProps = GlobalAttributes;
export interface FigcaptionElementProps extends GlobalAttributes {
}

/**
* figcaption renders the [`figcaption`](https://developer.mozilla.org/docs/Web/HTML/Element/figcaption) element.
Expand Down
3 changes: 2 additions & 1 deletion figure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* FigureElementProps are the props for the [`figure`](https://developer.mozilla.org/docs/Web/HTML/Element/figure) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/figure>
*/
export type FigureElementProps = GlobalAttributes;
export interface FigureElementProps extends GlobalAttributes {
}

/**
* figure renders the [`figure`](https://developer.mozilla.org/docs/Web/HTML/Element/figure) element.
Expand Down
3 changes: 2 additions & 1 deletion footer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* FooterElementProps are the props for the [`footer`](https://developer.mozilla.org/docs/Web/HTML/Element/footer) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/footer>
*/
export type FooterElementProps = GlobalAttributes;
export interface FooterElementProps extends GlobalAttributes {
}

/**
* footer renders the [`footer`](https://developer.mozilla.org/docs/Web/HTML/Element/footer) element.
Expand Down
3 changes: 2 additions & 1 deletion h1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* H1ElementProps are the props for the [`h1`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements>
*/
export type H1ElementProps = GlobalAttributes;
export interface H1ElementProps extends GlobalAttributes {
}

/**
* h1 renders the [`h1`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element.
Expand Down
3 changes: 2 additions & 1 deletion h2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* H2ElementProps are the props for the [`h2`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements>
*/
export type H2ElementProps = GlobalAttributes;
export interface H2ElementProps extends GlobalAttributes {
}

/**
* h2 renders the [`h2`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element.
Expand Down
3 changes: 2 additions & 1 deletion h3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* H3ElementProps are the props for the [`h3`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements>
*/
export type H3ElementProps = GlobalAttributes;
export interface H3ElementProps extends GlobalAttributes {
}

/**
* h3 renders the [`h3`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element.
Expand Down
3 changes: 2 additions & 1 deletion h4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* H4ElementProps are the props for the [`h4`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements>
*/
export type H4ElementProps = GlobalAttributes;
export interface H4ElementProps extends GlobalAttributes {
}

/**
* h4 renders the [`h4`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element.
Expand Down
3 changes: 2 additions & 1 deletion h5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* H5ElementProps are the props for the [`h5`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements>
*/
export type H5ElementProps = GlobalAttributes;
export interface H5ElementProps extends GlobalAttributes {
}

/**
* h5 renders the [`h5`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element.
Expand Down
3 changes: 2 additions & 1 deletion h6.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* H6ElementProps are the props for the [`h6`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements>
*/
export type H6ElementProps = GlobalAttributes;
export interface H6ElementProps extends GlobalAttributes {
}

/**
* h6 renders the [`h6`](https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements) element.
Expand Down
3 changes: 2 additions & 1 deletion header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* HeaderElementProps are the props for the [`header`](https://developer.mozilla.org/docs/Web/HTML/Element/header) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/header>
*/
export type HeaderElementProps = GlobalAttributes;
export interface HeaderElementProps extends GlobalAttributes {
}

/**
* header renders the [`header`](https://developer.mozilla.org/docs/Web/HTML/Element/header) element.
Expand Down
3 changes: 2 additions & 1 deletion hgroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* HgroupElementProps are the props for the [`hgroup`](https://developer.mozilla.org/docs/Web/HTML/Element/hgroup) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/hgroup>
*/
export type HgroupElementProps = GlobalAttributes;
export interface HgroupElementProps extends GlobalAttributes {
}

/**
* hgroup renders the [`hgroup`](https://developer.mozilla.org/docs/Web/HTML/Element/hgroup) element.
Expand Down
3 changes: 2 additions & 1 deletion i.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* IElementProps are the props for the [`i`](https://developer.mozilla.org/docs/Web/HTML/Element/i) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/i>
*/
export type IElementProps = GlobalAttributes;
export interface IElementProps extends GlobalAttributes {
}

/**
* i renders the [`i`](https://developer.mozilla.org/docs/Web/HTML/Element/i) element.
Expand Down
3 changes: 2 additions & 1 deletion kbd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* KbdElementProps are the props for the [`kbd`](https://developer.mozilla.org/docs/Web/HTML/Element/kbd) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/kbd>
*/
export type KbdElementProps = GlobalAttributes;
export interface KbdElementProps extends GlobalAttributes {
}

/**
* kbd renders the [`kbd`](https://developer.mozilla.org/docs/Web/HTML/Element/kbd) element.
Expand Down
3 changes: 2 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* MainElementProps are the props for the [`main`](https://developer.mozilla.org/docs/Web/HTML/Element/main) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/main>
*/
export type MainElementProps = GlobalAttributes;
export interface MainElementProps extends GlobalAttributes {
}

/**
* main renders the [`main`](https://developer.mozilla.org/docs/Web/HTML/Element/main) element.
Expand Down
3 changes: 2 additions & 1 deletion mark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* MarkElementProps are the props for the [`mark`](https://developer.mozilla.org/docs/Web/HTML/Element/mark) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/mark>
*/
export type MarkElementProps = GlobalAttributes;
export interface MarkElementProps extends GlobalAttributes {
}

/**
* mark renders the [`mark`](https://developer.mozilla.org/docs/Web/HTML/Element/mark) element.
Expand Down
3 changes: 2 additions & 1 deletion nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { renderElement } from "./lib/mod.ts";
* NavElementProps are the props for the [`nav`](https://developer.mozilla.org/docs/Web/HTML/Element/nav) element.
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/nav>
*/
export type NavElementProps = GlobalAttributes;
export interface NavElementProps extends GlobalAttributes {
}

/**
* nav renders the [`nav`](https://developer.mozilla.org/docs/Web/HTML/Element/nav) element.
Expand Down
3 changes: 2 additions & 1 deletion nobr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { renderElement } from "./lib/mod.ts";
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/nobr>
* @deprecated
*/
export type NobrElementProps = GlobalAttributes;
export interface NobrElementProps extends GlobalAttributes {
}

/**
* nobr renders the [`nobr`](https://developer.mozilla.org/docs/Web/HTML/Element/nobr) element.
Expand Down
3 changes: 2 additions & 1 deletion noembed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { renderElement } from "./lib/mod.ts";
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/noembed>
* @deprecated
*/
export type NoembedElementProps = GlobalAttributes;
export interface NoembedElementProps extends GlobalAttributes {
}

/**
* noembed renders the [`noembed`](https://developer.mozilla.org/docs/Web/HTML/Element/noembed) element.
Expand Down
3 changes: 2 additions & 1 deletion noframes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { renderElement } from "./lib/mod.ts";
* @see <https://developer.mozilla.org/docs/Web/HTML/Element/noframes>
* @deprecated
*/
export type NoframesElementProps = GlobalAttributes;
export interface NoframesElementProps extends GlobalAttributes {
}

/**
* noframes renders the [`noframes`](https://developer.mozilla.org/docs/Web/HTML/Element/noframes) element.
Expand Down
Loading

0 comments on commit 74380ba

Please sign in to comment.