Skip to content

Commit

Permalink
fix(types): 修复类型检查 (#1541)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: n

Issues: #1539
  • Loading branch information
septs authored and luckyadam committed Dec 17, 2018
1 parent 30d0e80 commit 26f0490
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions packages/taro-h5/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ declare namespace TaroH5 {

function getEnv(): 'WEAPP' | 'WEB' | 'RN';

function render(component: Component, element: Element)
function render(component: Component, element: Element): any;

/**
*
Expand Down Expand Up @@ -241,7 +241,7 @@ declare namespace TaroH5 {
/**
* 上传进度回调
*/
progress: (UploadTaskProgressCallback) => void
progress: (callback: UploadTaskProgressCallback) => void
/**
* 终止上传任务
*/
Expand Down Expand Up @@ -6488,9 +6488,9 @@ declare namespace TaroH5 {

/**
* getCurrentPages() 函数用于获取当前页面栈的实例,以数组形式按栈的顺序给出,第一个元素为首页,最后一个元素为当前页面。
*
*
* 注意:
*
*
* 不要尝试修改页面栈,会导致路由以及页面状态错误。
* 不要在 App.onLaunch 的时候调用 getCurrentPages(),此时 page 还没有生成。
*/
Expand Down
10 changes: 5 additions & 5 deletions packages/taro/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,10 +420,10 @@ declare namespace Taro {

function getEnv(): ENV_TYPE.WEAPP | ENV_TYPE.WEB | ENV_TYPE.RN;

function render(component: Component | JSX.Element, element: Element | null)
function render(component: Component | JSX.Element, element: Element | null): any;

function internal_safe_set (...arg): any
function internal_safe_get (...arg): any
function internal_safe_set (...arg: any[]): any;
function internal_safe_get (...arg: any[]): any;

function pxTransform(size: number): string

Expand Down Expand Up @@ -676,7 +676,7 @@ declare namespace Taro {
/**
* 上传进度回调
*/
progress: (UploadTaskProgressCallback) => void
progress: (callback: UploadTaskProgressCallback) => void
/**
* 终止上传任务
*/
Expand Down Expand Up @@ -2583,7 +2583,7 @@ declare namespace Taro {
/**
* 接口调用成功的回调函数 ,res = { tempThumbPath, tempVideoPath }
*/
type ParamPropSuccess = (res: { tempThumbPath, tempVideoPath }) => any
type ParamPropSuccess = (res: { tempThumbPath: string, tempVideoPath: string }) => any
/**
* 接口调用失败的回调函数
*/
Expand Down

0 comments on commit 26f0490

Please sign in to comment.