You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@leafer/decorator

Package Overview
Dependencies
Maintainers
1
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafer/decorator - npm Package Compare versions

Comparing version
1.6.7
to
1.7.0
+5
-5
package.json
{
"name": "@leafer/decorator",
"version": "1.6.7",
"version": "1.7.0",
"description": "@leafer/decorator",

@@ -25,9 +25,9 @@ "author": "Chao (Leafer) Wan",

"dependencies": {
"@leafer/platform": "1.6.7",
"@leafer/data": "1.6.7",
"@leafer/debug": "1.6.7"
"@leafer/platform": "1.7.0",
"@leafer/data": "1.7.0",
"@leafer/debug": "1.7.0"
},
"devDependencies": {
"@leafer/interface": "1.6.7"
"@leafer/interface": "1.7.0"
}
}

@@ -107,6 +107,9 @@ import { ILeafData, ILeaf, IObject, IValue, ILeafAttrDescriptor, ILeafAttrDescriptorFn, IValueFunction } from '@leafer/interface'

export function affectStrokeBoundsType(defaultValue?: IValue) {
export function affectStrokeBoundsType(defaultValue?: IValue, useStroke?: boolean) {
return decorateLeafAttr(defaultValue, (key: string) => attr({
set(value: IValue) {
this.__setAttr(key, value) && doStrokeType(this)
if (this.__setAttr(key, value)) {
doStrokeType(this)
if (useStroke) this.__.__useStroke = true
}
}

@@ -113,0 +116,0 @@ }))

@@ -16,3 +16,3 @@ import { ILeaf, IValue, ILeafAttrDescriptor, ILeafAttrDescriptorFn, IObject, IValueFunction, IFunction } from '@leafer/interface';

declare const pathType: typeof boundsType;
declare function affectStrokeBoundsType(defaultValue?: IValue): (target: ILeaf, key: string) => void;
declare function affectStrokeBoundsType(defaultValue?: IValue, useStroke?: boolean): (target: ILeaf, key: string) => void;
declare function doStrokeType(leaf: ILeaf): void;

@@ -19,0 +19,0 @@ declare const strokeType: typeof affectStrokeBoundsType;