@goldfishjs/composition-api
Advanced tools
Comparing version 2.9.0 to 2.10.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [2.10.0](https://github.com/alipay/goldfish/compare/v2.9.0...v2.10.0) (2022-03-23) | ||
### Features | ||
* test utils for composition api ([57acec9](https://github.com/alipay/goldfish/commit/57acec9d0ab2fc662251389168318f8d1d7f8d63)) | ||
# [2.9.0](https://github.com/alipay/goldfish/compare/v2.8.1...v2.9.0) (2022-03-19) | ||
@@ -8,0 +19,0 @@ |
/// <reference types="mini-types" /> | ||
import { IProps } from '@goldfishjs/reactive-connect'; | ||
import { ISetupFunction } from './setup/CommonSetup'; | ||
export declare function buildComponentOptions<P extends Record<string, any>, D = any>(arg1: P | ISetupFunction, arg2?: ISetupFunction, isComponent2Param?: boolean): tinyapp.ComponentOptions<P, D, {}>; | ||
export default function setupComponent<P extends IProps, D = Record<string, any>>(passInFn: ISetupFunction): tinyapp.ComponentOptions<P, D, {}>; | ||
export default function setupComponent<P, D = Record<string, any>>(passInProps: P, passInFn: ISetupFunction): tinyapp.ComponentOptions<P, D, {}>; |
@@ -18,3 +18,4 @@ import _attachLogic from "@goldfishjs/reactive-connect/lib/attachLogic"; | ||
var COMPONENT_SETUP_ID_KEY = '$$componentSetupId'; | ||
export default function setupComponent(arg1, arg2) { | ||
export function buildComponentOptions(arg1, arg2) { | ||
var isComponent2Param = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : isComponent2; | ||
var props = undefined; | ||
@@ -64,3 +65,3 @@ var fn = undefined; | ||
var enterKey = isComponent2 ? 'onInit' : 'didMount'; | ||
var enterKey = isComponent2Param ? 'onInit' : 'didMount'; | ||
@@ -136,2 +137,5 @@ _attachLogic(options, enterKey, 'before', function () { | ||
return options; | ||
} | ||
export default function setupComponent(arg1, arg2) { | ||
return buildComponentOptions(arg1, arg2); | ||
} |
{ | ||
"name": "@goldfishjs/composition-api", | ||
"version": "2.9.0", | ||
"version": "2.10.0", | ||
"description": "goldfish-composition-api", | ||
@@ -17,6 +17,6 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@goldfishjs/module-usage": "^2.9.0", | ||
"@goldfishjs/reactive": "^2.9.0", | ||
"@goldfishjs/reactive-connect": "^2.9.0", | ||
"@goldfishjs/utils": "^2.9.0", | ||
"@goldfishjs/module-usage": "^2.10.0", | ||
"@goldfishjs/reactive": "^2.10.0", | ||
"@goldfishjs/reactive-connect": "^2.10.0", | ||
"@goldfishjs/utils": "^2.10.0", | ||
"mini-types": "^0.1.3" | ||
@@ -23,0 +23,0 @@ }, |
66667
1324