-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(types/reactivity): use
DeepReadonly
type for readonly
return…
- Loading branch information
Pick
authored
Jul 15, 2020
1 parent
246ec5c
commit b772bba
Showing
3 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { readonly, describe, expectError } from './index' | ||
|
||
describe('should support DeepReadonly', () => { | ||
const r = readonly({ obj: { k: 'v' } }) | ||
// @ts-expect-error | ||
expectError((r.obj = {})) | ||
// @ts-expect-error | ||
expectError((r.obj.k = 'x')) | ||
}) |