ant-mini-program / mini-types Goto Github PK
View Code? Open in Web Editor NEWTypeScript declarations for Alipay's mini program.
License: Other
TypeScript declarations for Alipay's mini program.
License: Other
目前代码中在各处均出现了如下相同定义
success?():void
fail?():void
complete?():void
希望能使用范型和继承精简代码
interface IAsyncFunctionalOptions<SuccessResult=any, FailResult=any> {
/**
* 调用成功的回调函数
*/
success?(res: SuccessResult): void;
/**
* 调用失败的回调函数
*/
fail?(res: FailResult): void;
/**
* 调用结束的回调函数(调用成功、失败都会执行)
*/
complete?(res: any): void;
}
interface ISomeCallbackOptions extends IAsyncFunctionalOptions<ISomeSuccessResult>
Page({
onLoad(){
// this.greeting 无提示,类型为 any
},
greeting(name) {
return "Hello " + name;
}
})
比如 my.getExtConfigSync() 等还没有定义
我创建新页面后,将js文件改为ts文件,会报错没有js文件,这个没有自动编译的么?该如何运行呢?文档写的有点简单。
api/media/audio.d.ts 没有被引入
my.setClipboard({
text:'aaaaaaaaa',
success:function(text){
console.log('text', text);
},
});
输出和类型文件中的不同:
text {success:true}
Hi!
Just checking on the alipay documentations for my.scan() https://opendocs.alipay.com/mini/api/scan. I see that there's a change to the argument type
to scanType
and the input has changed from qr
| barCode
to Array that takes in ['qrCode','barCode']
Brandon
可以增加对sm2的国密支持类库么?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.