diff --git a/types/ali-oss/ali-oss-tests.ts b/types/ali-oss/ali-oss-tests.ts index f535ce3a3d02f0..7cc0abb7f94db1 100644 --- a/types/ali-oss/ali-oss-tests.ts +++ b/types/ali-oss/ali-oss-tests.ts @@ -9,6 +9,7 @@ const ossOptions: OSS.Options = { const client = new OSS(ossOptions); +client.listV2({ "max-keys": 1000 }); client.copy("newfile.png", "sourcefile.png"); client.copy("newfile.png", "sourcefile.png", { timeout: 1000 }); client.copy("newfile.png", "sourcefile.png", "sourceBucket"); diff --git a/types/ali-oss/index.d.ts b/types/ali-oss/index.d.ts index cfbad9395b9b30..927f2f628e7aa2 100644 --- a/types/ali-oss/index.d.ts +++ b/types/ali-oss/index.d.ts @@ -295,7 +295,7 @@ declare namespace OSS { /** only search current dir, not including subdir */ delimiter?: string | number; /** max objects, default is 100, limit to 1000 */ - "max-keys"?: string; + "max-keys"?: string | number; /** * The name of the object from which the list operation begins. * If this parameter is specified, objects whose names are alphabetically greater than the start-after parameter value are returned. @@ -1006,7 +1006,7 @@ declare class OSS { /** * List Objects in the bucket.(V2) */ - listV2(query: OSS.ListV2ObjectsQuery | null, options: OSS.RequestOptions): Promise; + listV2(query: OSS.ListV2ObjectsQuery | null, options?: OSS.RequestOptions): Promise; /** * Add an object to the bucket. diff --git a/types/ali-oss/package.json b/types/ali-oss/package.json index eaab8b7d7379ff..1df1bb56693c13 100644 --- a/types/ali-oss/package.json +++ b/types/ali-oss/package.json @@ -12,6 +12,10 @@ { "name": "Ptrdu", "githubUsername": "ptrdu" + }, + { + "name": "StarHeart", + "githubUsername": "StarHeartHunt" } ] } diff --git a/types/dom-webcodecs/test/dom-webcodecs-tests.ts b/types/dom-webcodecs/test/dom-webcodecs-tests.ts index df504eba787e84..567ea0e984a106 100644 --- a/types/dom-webcodecs/test/dom-webcodecs-tests.ts +++ b/types/dom-webcodecs/test/dom-webcodecs-tests.ts @@ -363,6 +363,12 @@ const videoDecoderConfig: VideoDecoderConfig = { codec: "avc1.64000c", }; +const videoDecoderConfigWithRotationAndFlip: VideoDecoderConfig = { + codec: "avc1.64000c", + rotation: 180, + flip: false, +}; + // @ts-expect-error VideoDecoder.isConfigSupported(); @@ -376,6 +382,13 @@ VideoDecoder.isConfigSupported(videoDecoderConfig).then((result: VideoDecoderSup result.config; }); +VideoDecoder.isConfigSupported(videoDecoderConfigWithRotationAndFlip).then((result: VideoDecoderSupport) => { + // $ExpectType boolean | undefined + result.supported; + // $ExpectType VideoDecoderConfig | undefined + result.config; +}); + function videoOutput(output: VideoFrame): void { // $ExpectType number | undefined output.visibleRect?.width; @@ -418,6 +431,9 @@ videoDecoder.configure({ description: new Uint8Array(0) }); // $ExpectType void videoDecoder.configure(videoDecoderConfig); +// $ExpectType void +videoDecoder.configure(videoDecoderConfigWithRotationAndFlip); + // additional properties are allowed const futureVideoDecoderConfig = { codec: "avc1.64000c", @@ -593,6 +609,10 @@ videoFrame.visibleRect?.height; videoFrame.displayWidth; // $ExpectType number videoFrame.displayHeight; +// $ExpectType number | undefined +videoFrame.rotation; +// $ExpectType boolean | undefined +videoFrame.flip; // @ts-expect-error new VideoFrame(new ArrayBuffer(1024), { diff --git a/types/dom-webcodecs/webcodecs.generated.d.ts b/types/dom-webcodecs/webcodecs.generated.d.ts index 077462b3da5603..359a50ca80e939 100644 --- a/types/dom-webcodecs/webcodecs.generated.d.ts +++ b/types/dom-webcodecs/webcodecs.generated.d.ts @@ -121,6 +121,8 @@ interface VideoDecoderConfig { displayAspectWidth?: number | undefined; hardwareAcceleration?: HardwarePreference | undefined; optimizeForLatency?: boolean | undefined; + rotation?: number | undefined; + flip?: boolean | undefined; } interface VideoDecoderInit { @@ -427,6 +429,7 @@ interface VideoFrame { readonly timestamp: number; readonly visibleRect: DOMRectReadOnly | null; readonly rotation?: number; + readonly flip?: boolean; allocationSize(options?: VideoFrameCopyToOptions): number; clone(): VideoFrame; close(): void;