DefinitelyTyped/types/ali-oss/ali-oss-tests.ts
2018-11-21 18:01:29 +08:00

26 lines
574 B
TypeScript

import * as OSS from 'ali-oss';
const ossOptions: OSS.Options = {
accessKeyId: 'your access key',
accessKeySecret: 'your access secret',
bucket: 'your bucket name',
region: 'oss-cn-hangzhou'
};
const client = new OSS(ossOptions);
const clusterOptions: OSS.ClusterOptions = {
clusters: [],
};
const clusterClient = new OSS.Cluster(clusterOptions);
const imageOptions: OSS.ImageClientOptions = {
imageHost: 'xxxx',
accessKeyId: 'xxxx',
accessKeySecret: 'xxxx',
bucket: 'xxxx'
};
const imageClient = new OSS.ImageClient(imageOptions);