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/bun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"https://bun.com"
],
"dependencies": {
"bun-types": "1.3.11"
"bun-types": "1.3.12"
},
"devDependencies": {
"@types/bun": "workspace:."
Expand Down
8 changes: 4 additions & 4 deletions types/office-js-preview/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11307,7 +11307,7 @@ declare namespace Office {
*
* - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments.
*
* @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 27,892,122 characters (about 25 MB).
* @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 34,865,152 characters. This corresponds to a maximum attachment size of 25 MB before Base64 encoding.
* @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters.
* @param options - An object literal that contains one or more of the following properties:-
* `asyncContext`: Developers can provide any object they wish to access in the callback function.
Expand Down Expand Up @@ -11354,7 +11354,7 @@ declare namespace Office {
*
* - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments.
*
* @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 27,892,122 characters (about 25 MB).
* @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 34,865,152 characters. This corresponds to a maximum attachment size of 25 MB before Base64 encoding.
* @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters.
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
* of type `Office.AsyncResult`.
Expand Down Expand Up @@ -20207,7 +20207,7 @@ declare namespace Office {
*
* - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments.
*
* @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 27,892,122 characters (about 25 MB).
* @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 34,865,152 characters. This corresponds to a maximum attachment size of 25 MB before Base64 encoding.
* @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters.
* @param options - An object literal that contains one or more of the following properties:-
* `asyncContext`: Developers can provide any object they wish to access in the callback function.
Expand Down Expand Up @@ -20263,7 +20263,7 @@ declare namespace Office {
*
* - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments.
*
* @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 27,892,122 characters (about 25 MB).
* @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 34,865,152 characters. This corresponds to a maximum attachment size of 25 MB before Base64 encoding.
* @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters.
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of type `Office.AsyncResult`.
* On success, the attachment identifier is provided in the `asyncResult.value` property. The identifier varies depending on the Outlook client.
Expand Down
8 changes: 4 additions & 4 deletions types/office-js/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11265,7 +11265,7 @@ declare namespace Office {
*
* - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments.
*
* @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 27,892,122 characters (about 25 MB).
* @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 34,865,152 characters. This corresponds to a maximum attachment size of 25 MB before Base64 encoding.
* @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters.
* @param options - An object literal that contains one or more of the following properties:-
* `asyncContext`: Developers can provide any object they wish to access in the callback function.
Expand Down Expand Up @@ -11312,7 +11312,7 @@ declare namespace Office {
*
* - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments.
*
* @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 27,892,122 characters (about 25 MB).
* @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 34,865,152 characters. This corresponds to a maximum attachment size of 25 MB before Base64 encoding.
* @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters.
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
* of type `Office.AsyncResult`.
Expand Down Expand Up @@ -19677,7 +19677,7 @@ declare namespace Office {
*
* - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments.
*
* @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 27,892,122 characters (about 25 MB).
* @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 34,865,152 characters. This corresponds to a maximum attachment size of 25 MB before Base64 encoding.
* @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters.
* @param options - An object literal that contains one or more of the following properties:-
* `asyncContext`: Developers can provide any object they wish to access in the callback function.
Expand Down Expand Up @@ -19733,7 +19733,7 @@ declare namespace Office {
*
* - `NumberOfAttachmentsExceeded`: The message or appointment has too many attachments.
*
* @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 27,892,122 characters (about 25 MB).
* @param base64File - The Base64-encoded content of an image or file to be added to an email or event. The maximum length of the encoded string is 34,865,152 characters. This corresponds to a maximum attachment size of 25 MB before Base64 encoding.
* @param attachmentName - The name of the attachment that is shown while the attachment is uploading. The maximum length is 255 characters.
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter of type `Office.AsyncResult`.
* On success, the attachment identifier is provided in the `asyncResult.value` property. The identifier varies depending on the Outlook client.
Expand Down
18 changes: 12 additions & 6 deletions types/puppeteer-har/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
interface PuppeteerHarOptions {
import type { Frame, Page } from "puppeteer";

export interface PuppeteerHarOptions {
path?: string;
saveResponse?: boolean;
captureMimeTypes?: boolean;
}

declare class PuppeteerHar {
export class PuppeteerHar {
constructor(page: any, options?: PuppeteerHarOptions);
start(options?: PuppeteerHarOptions): Promise<void>;
stop(): Promise<void>;
save(options: PuppeteerHarOptions): Promise<void>;
}
stop(): Promise<PuppeteerHar | undefined>;
cleanUp(): Promise<void>;

export = PuppeteerHar;
inProgress: boolean;
page: Page;
mainFrame: Frame;
}
6 changes: 5 additions & 1 deletion types/puppeteer-har/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"https://github.com/Everettss/puppeteer-har#readme"
],
"dependencies": {
"@types/puppeteer": "*"
"puppeteer": "*"
},
"devDependencies": {
"@types/puppeteer-har": "workspace:."
Expand All @@ -15,6 +15,10 @@
{
"name": "Julian Ordaz",
"githubUsername": "jordaz14"
},
{
"name": "Deniz Caglar",
"githubUsername": "CaglarDeniz"
}
]
}
27 changes: 17 additions & 10 deletions types/puppeteer-har/puppeteer-har-tests.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,40 @@
/// <reference lib="dom" />

// Import only for type-checking purposes
import PuppeteerHar from "puppeteer-har";
import { Frame, Page } from "puppeteer";
import { PuppeteerHar, PuppeteerHarOptions } from "puppeteer-har";

// Define a mock Page interface just for type-checking
interface MockPage {
goto(url: string): Promise<void>;
}

// Create a mock Page object for type-checking
const mockPage: MockPage = {
const mockPage: any = {
goto: async (url: string) => {
// Mock implementation
},
};

// Check if the PuppeteerHar class is correctly typed
const page: MockPage = mockPage as any; // Type assertion to use MockPage
const har = new PuppeteerHar(page);
const page: Page = mockPage as any; // Type assertion to use Page

const har = new PuppeteerHar(page, {
path: "",
saveResponse: true,
captureMimeTypes: true,
} as PuppeteerHarOptions);

// Type-check the methods of PuppeteerHar
const startPromise: Promise<void> = har.start();
const stopPromise: Promise<void> = har.stop();
const savePromise: Promise<void> = har.save({ path: "example.har" });
const stopPromise: Promise<PuppeteerHar | undefined> = har.stop();
const cleanupPromise: Promise<void> = har.cleanUp();

// Verify that the PuppeteerHar instance is correctly typed
const harInstance: PuppeteerHar = har;

const memberInProgress: boolean = har.inProgress;
const memberPage: Page = har.page;
const memberMainFrame: Frame = har.mainFrame;

// Ensure that the methods return the correct types
startPromise.then(() => console.log("Start method passed type check"));
stopPromise.then(() => console.log("Stop method passed type check"));
savePromise.then(() => console.log("Save method passed type check"));
cleanupPromise.then(() => console.log("Cleanup method passed type check"));
4 changes: 4 additions & 0 deletions types/youtube/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1035,3 +1035,7 @@ declare namespace YT {
getVideoData(): VideoData;
}
}

// eslint-disable-next-line @definitelytyped/export-just-namespace
export = YT;
export as namespace YT;
2 changes: 1 addition & 1 deletion types/youtube/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@types/youtube",
"version": "0.1.9999",
"version": "0.2.9999",
"projects": [
"https://developers.google.com/youtube/"
],
Expand Down
2 changes: 2 additions & 0 deletions types/youtube/youtube-tests.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import * as YT from "youtube";

const players: YT.Player[] = [
new YT.Player(document.body, {}),
new YT.Player(document.body, {
Expand Down