Skip to content

Commit

Permalink
Update TS types
Browse files Browse the repository at this point in the history
  • Loading branch information
npaun committed Dec 20, 2024
1 parent ce80785 commit d9535a3
Show file tree
Hide file tree
Showing 20 changed files with 880 additions and 220 deletions.
55 changes: 44 additions & 11 deletions types/generated-snapshot/2021-11-03/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1416,20 +1416,44 @@ interface Element {
hasAttribute(name: string): boolean;
setAttribute(name: string, value: string): Element;
removeAttribute(name: string): Element;
before(content: string, options?: ContentOptions): Element;
after(content: string, options?: ContentOptions): Element;
prepend(content: string, options?: ContentOptions): Element;
append(content: string, options?: ContentOptions): Element;
replace(content: string, options?: ContentOptions): Element;
before(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
after(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
prepend(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
append(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
replace(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
remove(): Element;
removeAndKeepContent(): Element;
setInnerContent(content: string, options?: ContentOptions): Element;
setInnerContent(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
onEndTag(handler: (tag: EndTag) => void | Promise<void>): void;
}
interface EndTag {
name: string;
before(content: string, options?: ContentOptions): EndTag;
after(content: string, options?: ContentOptions): EndTag;
before(
content: string | ReadableStream | Response,
options?: ContentOptions,
): EndTag;
after(
content: string | ReadableStream | Response,
options?: ContentOptions,
): EndTag;
remove(): EndTag;
}
interface Comment {
Expand All @@ -1444,9 +1468,18 @@ interface Text {
readonly text: string;
readonly lastInTextNode: boolean;
readonly removed: boolean;
before(content: string, options?: ContentOptions): Text;
after(content: string, options?: ContentOptions): Text;
replace(content: string, options?: ContentOptions): Text;
before(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Text;
after(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Text;
replace(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Text;
remove(): Text;
}
interface DocumentEnd {
Expand Down
55 changes: 44 additions & 11 deletions types/generated-snapshot/2021-11-03/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1421,20 +1421,44 @@ export interface Element {
hasAttribute(name: string): boolean;
setAttribute(name: string, value: string): Element;
removeAttribute(name: string): Element;
before(content: string, options?: ContentOptions): Element;
after(content: string, options?: ContentOptions): Element;
prepend(content: string, options?: ContentOptions): Element;
append(content: string, options?: ContentOptions): Element;
replace(content: string, options?: ContentOptions): Element;
before(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
after(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
prepend(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
append(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
replace(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
remove(): Element;
removeAndKeepContent(): Element;
setInnerContent(content: string, options?: ContentOptions): Element;
setInnerContent(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
onEndTag(handler: (tag: EndTag) => void | Promise<void>): void;
}
export interface EndTag {
name: string;
before(content: string, options?: ContentOptions): EndTag;
after(content: string, options?: ContentOptions): EndTag;
before(
content: string | ReadableStream | Response,
options?: ContentOptions,
): EndTag;
after(
content: string | ReadableStream | Response,
options?: ContentOptions,
): EndTag;
remove(): EndTag;
}
export interface Comment {
Expand All @@ -1449,9 +1473,18 @@ export interface Text {
readonly text: string;
readonly lastInTextNode: boolean;
readonly removed: boolean;
before(content: string, options?: ContentOptions): Text;
after(content: string, options?: ContentOptions): Text;
replace(content: string, options?: ContentOptions): Text;
before(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Text;
after(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Text;
replace(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Text;
remove(): Text;
}
export interface DocumentEnd {
Expand Down
55 changes: 44 additions & 11 deletions types/generated-snapshot/2022-01-31/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1422,20 +1422,44 @@ interface Element {
hasAttribute(name: string): boolean;
setAttribute(name: string, value: string): Element;
removeAttribute(name: string): Element;
before(content: string, options?: ContentOptions): Element;
after(content: string, options?: ContentOptions): Element;
prepend(content: string, options?: ContentOptions): Element;
append(content: string, options?: ContentOptions): Element;
replace(content: string, options?: ContentOptions): Element;
before(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
after(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
prepend(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
append(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
replace(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
remove(): Element;
removeAndKeepContent(): Element;
setInnerContent(content: string, options?: ContentOptions): Element;
setInnerContent(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
onEndTag(handler: (tag: EndTag) => void | Promise<void>): void;
}
interface EndTag {
name: string;
before(content: string, options?: ContentOptions): EndTag;
after(content: string, options?: ContentOptions): EndTag;
before(
content: string | ReadableStream | Response,
options?: ContentOptions,
): EndTag;
after(
content: string | ReadableStream | Response,
options?: ContentOptions,
): EndTag;
remove(): EndTag;
}
interface Comment {
Expand All @@ -1450,9 +1474,18 @@ interface Text {
readonly text: string;
readonly lastInTextNode: boolean;
readonly removed: boolean;
before(content: string, options?: ContentOptions): Text;
after(content: string, options?: ContentOptions): Text;
replace(content: string, options?: ContentOptions): Text;
before(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Text;
after(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Text;
replace(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Text;
remove(): Text;
}
interface DocumentEnd {
Expand Down
55 changes: 44 additions & 11 deletions types/generated-snapshot/2022-01-31/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1427,20 +1427,44 @@ export interface Element {
hasAttribute(name: string): boolean;
setAttribute(name: string, value: string): Element;
removeAttribute(name: string): Element;
before(content: string, options?: ContentOptions): Element;
after(content: string, options?: ContentOptions): Element;
prepend(content: string, options?: ContentOptions): Element;
append(content: string, options?: ContentOptions): Element;
replace(content: string, options?: ContentOptions): Element;
before(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
after(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
prepend(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
append(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
replace(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
remove(): Element;
removeAndKeepContent(): Element;
setInnerContent(content: string, options?: ContentOptions): Element;
setInnerContent(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
onEndTag(handler: (tag: EndTag) => void | Promise<void>): void;
}
export interface EndTag {
name: string;
before(content: string, options?: ContentOptions): EndTag;
after(content: string, options?: ContentOptions): EndTag;
before(
content: string | ReadableStream | Response,
options?: ContentOptions,
): EndTag;
after(
content: string | ReadableStream | Response,
options?: ContentOptions,
): EndTag;
remove(): EndTag;
}
export interface Comment {
Expand All @@ -1455,9 +1479,18 @@ export interface Text {
readonly text: string;
readonly lastInTextNode: boolean;
readonly removed: boolean;
before(content: string, options?: ContentOptions): Text;
after(content: string, options?: ContentOptions): Text;
replace(content: string, options?: ContentOptions): Text;
before(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Text;
after(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Text;
replace(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Text;
remove(): Text;
}
export interface DocumentEnd {
Expand Down
55 changes: 44 additions & 11 deletions types/generated-snapshot/2022-03-21/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1440,20 +1440,44 @@ interface Element {
hasAttribute(name: string): boolean;
setAttribute(name: string, value: string): Element;
removeAttribute(name: string): Element;
before(content: string, options?: ContentOptions): Element;
after(content: string, options?: ContentOptions): Element;
prepend(content: string, options?: ContentOptions): Element;
append(content: string, options?: ContentOptions): Element;
replace(content: string, options?: ContentOptions): Element;
before(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
after(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
prepend(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
append(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
replace(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
remove(): Element;
removeAndKeepContent(): Element;
setInnerContent(content: string, options?: ContentOptions): Element;
setInnerContent(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Element;
onEndTag(handler: (tag: EndTag) => void | Promise<void>): void;
}
interface EndTag {
name: string;
before(content: string, options?: ContentOptions): EndTag;
after(content: string, options?: ContentOptions): EndTag;
before(
content: string | ReadableStream | Response,
options?: ContentOptions,
): EndTag;
after(
content: string | ReadableStream | Response,
options?: ContentOptions,
): EndTag;
remove(): EndTag;
}
interface Comment {
Expand All @@ -1468,9 +1492,18 @@ interface Text {
readonly text: string;
readonly lastInTextNode: boolean;
readonly removed: boolean;
before(content: string, options?: ContentOptions): Text;
after(content: string, options?: ContentOptions): Text;
replace(content: string, options?: ContentOptions): Text;
before(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Text;
after(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Text;
replace(
content: string | ReadableStream | Response,
options?: ContentOptions,
): Text;
remove(): Text;
}
interface DocumentEnd {
Expand Down
Loading

0 comments on commit d9535a3

Please sign in to comment.