Skip to content
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
2 changes: 1 addition & 1 deletion types/m3u8-parser/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export interface Manifest {

export class Parser extends Stream {
constructor(options?: {
url?: string;
uri?: string;
mainDefinitions?: Record<string, string>;
});
lineStream: LineStream;
Expand Down
2 changes: 1 addition & 1 deletion types/m3u8-parser/m3u8-parser-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ parser.end();
const parsedManifest = parser.manifest.playlists?.[0].contentProtection?.["com.apple.fps.1_0"]?.attributes.resoltion;

const parser2 = new Parser({
url: "https://exmaple.com/video.m3u8?param_a=34&param_b=abc",
uri: "https://exmaple.com/video.m3u8?param_a=34&param_b=abc",
mainDefinitions: {
param_c: "def",
},
Expand Down
1 change: 1 addition & 0 deletions types/react-dom/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export interface PreloadOptions {
type?: string | undefined;
nonce?: string | undefined;
referrerPolicy?: ReferrerPolicy | undefined;
media?: string | undefined;
}
export function preload(href: string, options?: PreloadOptions): void;

Expand Down
1 change: 1 addition & 0 deletions types/react-dom/test/react-dom-tests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ function preloadTest() {
imageSrcSet: "fooset",
imageSizes: "foosizes",
referrerPolicy: "no-referrer",
media: "(max-width: 600px)",
});
ReactDOM.preload("foo", {
as: "image",
Expand Down
1 change: 1 addition & 0 deletions types/react-dom/v18/canary.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ declare module "." {
type?: string | undefined;
nonce?: string | undefined;
referrerPolicy?: ReferrerPolicy | undefined;
media?: string | undefined;
}
function preload(href: string, options?: PreloadOptions): void;

Expand Down
1 change: 1 addition & 0 deletions types/react-dom/v18/test/canary-tests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function preloadTest() {
imageSrcSet: "fooset",
imageSizes: "foosizes",
referrerPolicy: "no-referrer",
media: "(max-width: 600px)",
});
ReactDOM.preload("foo", {
as: "image",
Expand Down
6 changes: 4 additions & 2 deletions types/textarea-caret/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export = textarea_caret;
export = getCaretCoordinates;

interface Caret {
top: number;
Expand All @@ -10,4 +10,6 @@ interface Options {
debug?: boolean | undefined;
}

declare function textarea_caret(element: HTMLElement, position: number, options?: Options): Caret;
declare function getCaretCoordinates(element: HTMLElement, position: number, options?: Options): Caret;

export as namespace getCaretCoordinates;
19 changes: 14 additions & 5 deletions types/textarea-caret/textarea-caret-tests.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import getCaretCoordinates = require("textarea-caret");
import anyNameYouLike = require("textarea-caret");

const element = document.querySelector("textarea");

element!.addEventListener("input", function() {
const caret = getCaretCoordinates(this, this.selectionEnd);
console.log("(top, left, height) = (%s, %s, %s)", caret.top, caret.left, caret.height);
});
function testImportedLibrary() {
element!.addEventListener("input", function() {
const caret = anyNameYouLike(this, this.selectionEnd);
console.log("(top, left, height) = (%s, %s, %s)", caret.top, caret.left, caret.height);
});
}

function testGlobalName() {
element!.addEventListener("input", function() {
const caret = window.getCaretCoordinates(this, this.selectionEnd);
console.log("(top, left, height) = (%s, %s, %s)", caret.top, caret.left, caret.height);
});
}