Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Commit a45c3b4

Browse files
committed
removed computed persist
1 parent 488c87c commit a45c3b4

File tree

3 files changed

+0
-20
lines changed

3 files changed

+0
-20
lines changed

packages/core/src/computed/computed.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,14 +200,6 @@ export class Computed<ComputedValueType = any> extends State<
200200

201201
return computedValue;
202202
}
203-
204-
/**
205-
* Not usable in Computed Class.
206-
*/
207-
public persist(): this {
208-
LogCodeManager.log('19:03:00');
209-
return this;
210-
}
211203
}
212204

213205
export type ComputeFunctionType<ComputedValueType = any> = () =>

packages/core/src/logCodeManager.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,6 @@ const niceLogCodeMessages = {
102102
'18:03:00': "Failed to integrate Framework '${0}' into AgileTs '${1}'!",
103103

104104
// Computed
105-
'19:03:00':
106-
"The 'persist()' method can't be used in the Computed Class! " +
107-
"The Computed Class has a dynamic value which shouldn't be persisted. " +
108-
'Consider persisting the values the Computed depends on.',
109105

110106
// Collection Persistent
111107
'1A:02:00': 'Failed to build unique Item StorageKey!',

packages/core/tests/unit/computed/computed.test.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -447,13 +447,5 @@ describe('Computed Tests', () => {
447447
}
448448
);
449449
});
450-
451-
describe('persist function tests', () => {
452-
it('should print error', () => {
453-
computed.persist();
454-
455-
LogMock.hasLoggedCode('19:03:00');
456-
});
457-
});
458450
});
459451
});

0 commit comments

Comments
 (0)