diff --git a/types/bun/package.json b/types/bun/package.json index 39c706fe02125f..74cb7619cddc73 100644 --- a/types/bun/package.json +++ b/types/bun/package.json @@ -6,7 +6,7 @@ "https://bun.com" ], "dependencies": { - "bun-types": "1.3.11" + "bun-types": "1.3.12" }, "devDependencies": { "@types/bun": "workspace:." diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index b2d89728502106..20155654e40705 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -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. @@ -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`. @@ -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. @@ -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. diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 8dbb72ad56135b..1ce8d7b71c557c 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -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. @@ -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`. @@ -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. @@ -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. diff --git a/types/puppeteer-har/index.d.ts b/types/puppeteer-har/index.d.ts index 1b8431f34a3985..08f05cf35ebf7a 100644 --- a/types/puppeteer-har/index.d.ts +++ b/types/puppeteer-har/index.d.ts @@ -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; - stop(): Promise; - save(options: PuppeteerHarOptions): Promise; -} + stop(): Promise; + cleanUp(): Promise; -export = PuppeteerHar; + inProgress: boolean; + page: Page; + mainFrame: Frame; +} diff --git a/types/puppeteer-har/package.json b/types/puppeteer-har/package.json index d804bb8a022880..140213dcbf84f3 100644 --- a/types/puppeteer-har/package.json +++ b/types/puppeteer-har/package.json @@ -6,7 +6,7 @@ "https://github.com/Everettss/puppeteer-har#readme" ], "dependencies": { - "@types/puppeteer": "*" + "puppeteer": "*" }, "devDependencies": { "@types/puppeteer-har": "workspace:." @@ -15,6 +15,10 @@ { "name": "Julian Ordaz", "githubUsername": "jordaz14" + }, + { + "name": "Deniz Caglar", + "githubUsername": "CaglarDeniz" } ] } diff --git a/types/puppeteer-har/puppeteer-har-tests.ts b/types/puppeteer-har/puppeteer-har-tests.ts index 6834d6c3908f6f..b28fccbd98b51e 100644 --- a/types/puppeteer-har/puppeteer-har-tests.ts +++ b/types/puppeteer-har/puppeteer-har-tests.ts @@ -1,33 +1,40 @@ /// // 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; -} // 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 = har.start(); -const stopPromise: Promise = har.stop(); -const savePromise: Promise = har.save({ path: "example.har" }); +const stopPromise: Promise = har.stop(); +const cleanupPromise: Promise = 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")); diff --git a/types/youtube/index.d.ts b/types/youtube/index.d.ts index 0e803982e0929a..62c58755976091 100644 --- a/types/youtube/index.d.ts +++ b/types/youtube/index.d.ts @@ -1035,3 +1035,7 @@ declare namespace YT { getVideoData(): VideoData; } } + +// eslint-disable-next-line @definitelytyped/export-just-namespace +export = YT; +export as namespace YT; diff --git a/types/youtube/package.json b/types/youtube/package.json index c0557bb77dadad..20220bae5f4413 100644 --- a/types/youtube/package.json +++ b/types/youtube/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@types/youtube", - "version": "0.1.9999", + "version": "0.2.9999", "projects": [ "https://developers.google.com/youtube/" ], diff --git a/types/youtube/youtube-tests.ts b/types/youtube/youtube-tests.ts index fd68f5ea5b9901..617a561860e3e3 100644 --- a/types/youtube/youtube-tests.ts +++ b/types/youtube/youtube-tests.ts @@ -1,3 +1,5 @@ +import * as YT from "youtube"; + const players: YT.Player[] = [ new YT.Player(document.body, {}), new YT.Player(document.body, {