mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
17 lines
378 B
Plaintext
17 lines
378 B
Plaintext
b.ts(3,5): error TS2540: Cannot assign to 'a' because it is a read-only property.
|
|
|
|
|
|
==== a.ts (0 errors) ====
|
|
const foo = {
|
|
a: 1
|
|
}
|
|
|
|
export default foo as Readonly<typeof foo>
|
|
|
|
==== b.ts (1 errors) ====
|
|
import foo from './a'
|
|
|
|
foo.a = 2
|
|
~
|
|
!!! error TS2540: Cannot assign to 'a' because it is a read-only property.
|
|
|