Comparing version 0.2.2 to 0.2.3
@@ -18,9 +18,9 @@ declare const $get: unique symbol; | ||
declare function callFluidObservers(target: object, event: FluidEvent): void; | ||
interface GetFluidValue { | ||
declare type GetFluidValue = { | ||
<T, U = never>(target: T | FluidValue<U>): Exclude<T, FluidValue> | U; | ||
} | ||
interface GetFluidObservers { | ||
}; | ||
declare type GetFluidObservers = { | ||
<E extends FluidEvent>(target: FluidValue<any, E>): ReadonlySet<FluidObserver<E>> | null; | ||
(target: object): ReadonlySet<FluidObserver> | null; | ||
} | ||
}; | ||
/** An event sent to `FluidObserver` objects. */ | ||
@@ -56,2 +56,6 @@ export interface FluidEvent<T = any> { | ||
} : unknown; | ||
/** Remove the `FluidValue` type from every property. */ | ||
export declare type StaticProps<T extends object> = { | ||
[P in keyof T]: T[P] extends FluidValue<infer U> ? U : T[P]; | ||
}; | ||
/** Define the getter called by `getFluidValue`. */ | ||
@@ -58,0 +62,0 @@ declare const setFluidGetter: (target: object, get: () => any) => any; |
@@ -91,4 +91,8 @@ "use strict"; | ||
var setHidden = function (target, key, value) { | ||
return Object.defineProperty(target, key, { value: value, configurable: true }); | ||
return Object.defineProperty(target, key, { | ||
value: value, | ||
writable: true, | ||
configurable: true, | ||
}); | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -18,9 +18,9 @@ declare const $get: unique symbol; | ||
declare function callFluidObservers(target: object, event: FluidEvent): void; | ||
interface GetFluidValue { | ||
declare type GetFluidValue = { | ||
<T, U = never>(target: T | FluidValue<U>): Exclude<T, FluidValue> | U; | ||
} | ||
interface GetFluidObservers { | ||
}; | ||
declare type GetFluidObservers = { | ||
<E extends FluidEvent>(target: FluidValue<any, E>): ReadonlySet<FluidObserver<E>> | null; | ||
(target: object): ReadonlySet<FluidObserver> | null; | ||
} | ||
}; | ||
/** An event sent to `FluidObserver` objects. */ | ||
@@ -56,2 +56,6 @@ export interface FluidEvent<T = any> { | ||
} : unknown; | ||
/** Remove the `FluidValue` type from every property. */ | ||
export declare type StaticProps<T extends object> = { | ||
[P in keyof T]: T[P] extends FluidValue<infer U> ? U : T[P]; | ||
}; | ||
/** Define the getter called by `getFluidValue`. */ | ||
@@ -58,0 +62,0 @@ declare const setFluidGetter: (target: object, get: () => any) => any; |
@@ -82,4 +82,8 @@ var $get = Symbol.for('FluidValue.get'); | ||
var setHidden = function (target, key, value) { | ||
return Object.defineProperty(target, key, { value: value, configurable: true }); | ||
return Object.defineProperty(target, key, { | ||
value: value, | ||
writable: true, | ||
configurable: true, | ||
}); | ||
}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "fluids", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "Glue layer for reactivity", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index", |
@@ -62,7 +62,7 @@ const $get = Symbol.for('FluidValue.get') | ||
interface GetFluidValue { | ||
type GetFluidValue = { | ||
<T, U = never>(target: T | FluidValue<U>): Exclude<T, FluidValue> | U | ||
} | ||
interface GetFluidObservers { | ||
type GetFluidObservers = { | ||
<E extends FluidEvent>(target: FluidValue<any, E>): ReadonlySet< | ||
@@ -115,2 +115,7 @@ FluidObserver<E> | ||
/** Remove the `FluidValue` type from every property. */ | ||
export type StaticProps<T extends object> = { | ||
[P in keyof T]: T[P] extends FluidValue<infer U> ? U : T[P] | ||
} | ||
/** Define the getter called by `getFluidValue`. */ | ||
@@ -173,2 +178,6 @@ const setFluidGetter = (target: object, get: () => any) => | ||
const setHidden = (target: any, key: any, value: any) => | ||
Object.defineProperty(target, key, { value, configurable: true }) | ||
Object.defineProperty(target, key, { | ||
value, | ||
writable: true, | ||
configurable: true, | ||
}) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
26116
469