@frui.ts/dirtycheck
Advanced tools
Comparing version 0.15.0-beta.2 to 0.15.0-beta.3
import { DirtyPropertiesList, IDirtyWatcher } from "./types"; | ||
export default class AutomaticDirtyWatcher<TTarget extends {}> implements IDirtyWatcher<TTarget> { | ||
export default class AutomaticDirtyWatcher<TTarget extends Record<string, any>> implements IDirtyWatcher<TTarget> { | ||
private target; | ||
@@ -4,0 +4,0 @@ isDirtyFlagVisible: boolean; |
@@ -1,2 +0,3 @@ | ||
import { IHasDirtyWatcher, IHasManualDirtyWatcher, PropertyName } from "./types"; | ||
import { PropertyName } from "@frui.ts/helpers"; | ||
import { IHasDirtyWatcher, IHasManualDirtyWatcher } from "./types"; | ||
export declare function attachAutomaticDirtyWatcher<TTarget>(target: TTarget, dirtyFlagsImmediatelyVisible?: boolean): TTarget & IHasDirtyWatcher<TTarget>; | ||
@@ -3,0 +4,0 @@ export declare function attachManualDirtyWatcher<TTarget>(target: TTarget, dirtyFlagsImmediatelyVisible?: boolean): TTarget & IHasManualDirtyWatcher<TTarget>; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var mobx_1 = require("mobx"); | ||
var automaticDirtyWatcher_1 = require("./automaticDirtyWatcher"); | ||
var manualDirtyWatcher_1 = require("./manualDirtyWatcher"); | ||
var automaticDirtyWatcher_1 = __importDefault(require("./automaticDirtyWatcher")); | ||
var manualDirtyWatcher_1 = __importDefault(require("./manualDirtyWatcher")); | ||
function attachAutomaticDirtyWatcher(target, dirtyFlagsImmediatelyVisible) { | ||
@@ -7,0 +10,0 @@ if (dirtyFlagsImmediatelyVisible === void 0) { dirtyFlagsImmediatelyVisible = false; } |
@@ -1,2 +0,3 @@ | ||
import { DirtyPropertiesList, IHasManualDirtyWatcher, IManualDirtyWatcher, PropertyName } from "./types"; | ||
import { PropertyName } from "@frui.ts/helpers"; | ||
import { DirtyPropertiesList, IHasManualDirtyWatcher, IManualDirtyWatcher } from "./types"; | ||
export default class ManualDirtyWatcher<TTarget> implements IManualDirtyWatcher<TTarget> { | ||
@@ -6,3 +7,3 @@ isDirtyFlagVisible: boolean; | ||
constructor(target: TTarget, isDirtyFlagVisible: boolean); | ||
setDirty(propertyName: string & keyof TTarget, isDirty?: boolean): void; | ||
setDirty(propertyName: PropertyName<TTarget>, isDirty?: boolean): void; | ||
reset(): void; | ||
@@ -9,0 +10,0 @@ get isDirty(): boolean; |
@@ -44,3 +44,3 @@ "use strict"; | ||
__metadata("design:type", Function), | ||
__metadata("design:paramtypes", [Object, Object]), | ||
__metadata("design:paramtypes", [String, Object]), | ||
__metadata("design:returntype", void 0) | ||
@@ -47,0 +47,0 @@ ], ManualDirtyWatcher.prototype, "setDirty", null); |
@@ -1,2 +0,2 @@ | ||
export declare type PropertyName<TTarget> = string & keyof TTarget; | ||
import { PropertyName } from "@frui.ts/helpers"; | ||
export declare type DirtyPropertiesList<TTarget> = Partial<Record<PropertyName<TTarget>, boolean>>; | ||
@@ -3,0 +3,0 @@ export interface IDirtyWatcher<TTarget> { |
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "0.15.0-beta.2", | ||
"version": "0.15.0-beta.3", | ||
"description": "Observable dirty checking", | ||
@@ -39,6 +39,8 @@ "keywords": [ | ||
"dependencies": { | ||
"@frui.ts/helpers": "^0.15.0-beta.2", | ||
"mobx": "^4.15.4" | ||
"@frui.ts/helpers": "^0.15.0-beta.3" | ||
}, | ||
"gitHead": "a1950d8a2f4b4b2bfddbca22972c322b2586c33d" | ||
"peerDependencies": { | ||
"mobx": "^4.0.0 || ^5.0.0" | ||
}, | ||
"gitHead": "a50c956e5476cce829dec2d2a976eeebb336ad1b" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
30792
275
+ Addedmobx@5.15.7(transitive)
- Removedmobx@^4.15.4
- Removedmobx@4.15.7(transitive)