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
1 change: 1 addition & 0 deletions types/ali-oss/ali-oss-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions types/ali-oss/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -1006,7 +1006,7 @@ declare class OSS {
/**
* List Objects in the bucket.(V2)
*/
listV2(query: OSS.ListV2ObjectsQuery | null, options: OSS.RequestOptions): Promise<OSS.ListObjectResult>;
listV2(query: OSS.ListV2ObjectsQuery | null, options?: OSS.RequestOptions): Promise<OSS.ListObjectResult>;

/**
* Add an object to the bucket.
Expand Down
4 changes: 4 additions & 0 deletions types/ali-oss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
{
"name": "Ptrdu",
"githubUsername": "ptrdu"
},
{
"name": "StarHeart",
"githubUsername": "StarHeartHunt"
}
]
}
20 changes: 20 additions & 0 deletions types/dom-webcodecs/test/dom-webcodecs-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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;
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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), {
Expand Down
3 changes: 3 additions & 0 deletions types/dom-webcodecs/webcodecs.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ interface VideoDecoderConfig {
displayAspectWidth?: number | undefined;
hardwareAcceleration?: HardwarePreference | undefined;
optimizeForLatency?: boolean | undefined;
rotation?: number | undefined;
flip?: boolean | undefined;
}

interface VideoDecoderInit {
Expand Down Expand Up @@ -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;
Expand Down