@mini-types/global
Advanced tools
Comparing version 3.0.3 to 3.0.4
{ | ||
"name": "@mini-types/global", | ||
"version": "3.0.3", | ||
"version": "3.0.4", | ||
"description": "TypeScript declarations for Alipay's mini program.", | ||
@@ -24,3 +24,3 @@ "scripts": {}, | ||
}, | ||
"gitHead": "51193150e601ef6b22603875042fa8d137dce812" | ||
"gitHead": "2e27c0806426c7461d04cd8f70c398bd60af0c9e" | ||
} |
@@ -30,7 +30,7 @@ /// <reference path="./lib.app.d.ts" /> | ||
type TGetMixinMethods<T> = T extends { methods: infer M } ? M : never; | ||
type TGetMixinMethods<T> = T extends { methods?: infer M } ? M : never; | ||
type TGetMixinData<T> = T extends { data: infer D } ? D : never; | ||
type TGetMixinData<T> = T extends { data?: infer D } ? D : never; | ||
type TGetMixinProps<T> = T extends { props: infer P } ? P : never; | ||
type TGetMixinProps<T> = T extends { props?: infer P } ? P : never; | ||
@@ -37,0 +37,0 @@ // 整合一下类型 |
@@ -280,7 +280,7 @@ declare namespace MiniProgram.Component { | ||
< | ||
Data = {}, | ||
Props = {}, | ||
Methods = {}, | ||
ExtraThis = {}, | ||
ExtraOptions extends Record<string, unknown> = {}, | ||
Data = UnknownRecord, | ||
Props = UnknownRecord, | ||
Methods = UnknownRecord, | ||
ExtraThis = UnknownRecord, | ||
ExtraOptions extends Record<string, unknown> = UnknownRecord, | ||
Mixins extends Array< | ||
@@ -287,0 +287,0 @@ Mixin.IMixin4Legacy | ReturnType<Mixin.Constructor> |
@@ -10,2 +10,16 @@ export type IAppOnLaunchOptions<Query extends Record<string, string>> = | ||
export type IMixin4Legacy< | ||
Data, | ||
Props, | ||
Methods, | ||
ExtraThis = MiniProgram.UnknownRecord, | ||
ExtraOptions extends MiniProgram.UnknownRecord = MiniProgram.UnknownRecord | ||
> = MiniProgram.Mixin.IMixin4Legacy< | ||
Data, | ||
Props, | ||
Methods, | ||
ExtraThis, | ||
ExtraOptions | ||
>; | ||
declare global { | ||
@@ -12,0 +26,0 @@ /** |
@@ -5,14 +5,21 @@ declare namespace MiniProgram.Mixin { | ||
*/ | ||
type IMixin4Legacy = Partial< | ||
Omit< | ||
Component.IOptions< | ||
UnknownRecord, | ||
UnknownRecord, | ||
UnknownRecord, | ||
UnknownRecord, | ||
type IMixin4Legacy< | ||
Data extends UnknownRecord, | ||
Props extends UnknownRecord, | ||
Methods extends UnknownRecord, | ||
ExtraThis extends UnknownRecord = UnknownRecord, | ||
ExtraOptions extends UnknownRecord = UnknownRecord | ||
> = Partial< | ||
MiniProgram.Component.IOptions<Data, Props, Methods, ExtraOptions, []> | ||
> & | ||
ThisType< | ||
MiniProgram.Component.IInstance< | ||
Data, | ||
Props, | ||
Methods, | ||
ExtraThis & IGlobalMiniProgramExtraThis4Component, | ||
ExtraOptions, | ||
[] | ||
>, | ||
'ref' | 'options' | 'mixins' | 'externalClasses' | ||
> | ||
>; | ||
> | ||
>; | ||
/** | ||
@@ -81,8 +88,8 @@ * Mixin() 返回值 | ||
< | ||
Data = {}, | ||
Props = {}, | ||
Methods = {}, | ||
ExtraThis = {}, | ||
ExtraOptions extends Record<string, unknown> = {}, | ||
Mixins extends IMixinIdentifier[] = IMixinIdentifier[] | ||
Data = UnknownRecord, | ||
Props = UnknownRecord, | ||
Methods = UnknownRecord, | ||
ExtraThis = UnknownRecord, | ||
ExtraOptions extends UnknownRecord = UnknownRecord, | ||
Mixins extends IMixinIdentifier[] = [] | ||
>( | ||
@@ -89,0 +96,0 @@ options: IMixinOptions< |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
228918
5725