Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mini-types

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mini-types - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

.github/workflows/nodejs.yml

2

package.json
{
"name": "mini-types",
"version": "0.1.1",
"version": "0.1.2",
"description": "TypeScript declarations for Alipay's mini program.",

@@ -5,0 +5,0 @@ "scripts": {

@@ -155,2 +155,19 @@ /**

/**
* 清除本地数据缓存异步方法 参数
*/
interface IClearStorageOptions {
/**
* 调用成功的回调函数
*/
success?: () => void;
/**
* 调用失败的回调函数
*/
fail?: () => void;
/**
* 调用结束的回调函数(调用成功、失败都会执行)
*/
complete?: () => void;
}
/**
* 清除本地数据缓存。

@@ -160,3 +177,3 @@ *

*/
function clearStorage(): void;
function clearStorage(options?: IClearStorageOptions): void;

@@ -163,0 +180,0 @@ /**

@@ -9,3 +9,3 @@ /**

*/
success?(text: string): void;
success?(res: { text: string }): void;

@@ -20,5 +20,25 @@ /**

*/
complete?(): void;
complete?(res: { text: string }): void;
}
interface ISetClipboardOptions {
/**
* 剪贴板内容
*/
text: string;
/**
* 调用失败的回调函数
*/
fail?(): void;
/**
* 调用结束的回调函数(调用成功、失败都会执行)
*/
complete?(res: { success: boolean }): void;
/**
* 调用成功的回调函数
*/
success?: (res: { success: boolean }) => void;
}
/**

@@ -32,8 +52,3 @@ * 获取剪贴板数据。

*/
function setClipboard(options: IClipboardOptions & {
/**
* 剪贴板数据
*/
text: string;
}): void;
function setClipboard(options: ISetClipboardOptions): void;
}

@@ -5,3 +5,3 @@ /**

declare namespace my {
type SettingScopeList = 'scope.userInfo' | 'scope.location' | 'scope.album' | 'scope.camera' | 'scope.audioRecord';
type SettingScopeList = 'userInfo' | 'location' | 'album' | 'camera' | 'audioRecord';

@@ -8,0 +8,0 @@ interface IOpenSettingSuccessOptions {

@@ -65,3 +65,2 @@ /**

readonly country?: string;
readonly bearing: string;

@@ -116,3 +115,3 @@ /**

*/
success?: (res?: IGetLocationSuccessResult) => void;
success?: (res: IGetLocationSuccessResult) => void;

@@ -119,0 +118,0 @@ /**

@@ -179,2 +179,8 @@ /**

/**
* 压缩图片的返回值
*/
interface ICompressImageSuccessResult {
apFilePaths: string[];
}
interface ICompressImageOptions {

@@ -200,3 +206,3 @@ /**

*/
success?(): void;
success?(res: ICompressImageSuccessResult): void;

@@ -203,0 +209,0 @@ /**

@@ -42,6 +42,11 @@ /**

interface IHideToastOptions {
success?: () => void;
fail?: () => void;
complete?: () => void;
}
/**
* 隐藏消息提示框
*/
function hideToast(): void;
function hideToast(options?: IHideToastOptions): void;

@@ -48,0 +53,0 @@ interface IAlertOptions {

@@ -17,1 +17,2 @@ /// <reference path="./navigator.d.ts" />

/// <reference path="./font.d.ts" />
/// <reference path="./pulldown.d.ts" />

@@ -69,3 +69,3 @@ declare namespace my {

interface ISetNavigationBar extends INavigateBaseCallbackOptions {
interface ISetNavigationBarOptions extends INavigateBaseCallbackOptions {
/**

@@ -96,3 +96,3 @@ * 导航栏标题

*/
function setNavigationBar(options: ISetNavigationBar): void;
function setNavigationBar(options: ISetNavigationBarOptions): void;

@@ -99,0 +99,0 @@ /**

@@ -5,6 +5,16 @@ /**

declare namespace my {
interface IStartPullDownRefreshOptions {
success?: () => void;
fail?: () => void;
complete?: () => void;
}
interface IStopPullDownRefreshOptions {
success?: () => void;
fail?: () => void;
complete?: () => void;
}
/**
* 停止当前页面的下拉刷新。
*/
function stopPullDownRefresh(): void;
function stopPullDownRefresh(options?: IStartPullDownRefreshOptions): void;

@@ -14,3 +24,3 @@ /**

*/
function startPullDownRefresh(): void;
function startPullDownRefresh(options?: IStopPullDownRefreshOptions): void;
}

@@ -7,5 +7,25 @@ /**

/**
* 滚动到页面的目标位置,单位 px
* 滚动到页面的目标位置,单位 px。使用 my.pageScrollTo 跳转小程序顶部时,必须将 scrollTop 值设为大于 0,方可实现跳转
*/
scrollTop: number;
scrollTop?: number;
/**
* 滚动动画的时长,单位ms
*/
duration?: number;
/**
* 选择器
*/
selector?: string;
/**
* 接口调用成功的回调函数
*/
success?: () => void;
/**
* 接口调用失败的回调函数
*/
fail?: () => void;
/**
* 接口调用结束的回调函数(调用成功、失败都会执行)
*/
complete?: () => void;
}

@@ -12,0 +32,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc