Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readonly properties and index signatures #6532

Merged
merged 34 commits into from
Jan 27, 2016
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b46efc9
Allow modifies on type members + introduce "readonly" modifier
ahejlsberg Jan 14, 2016
07b7008
Accepting new baselines
ahejlsberg Jan 14, 2016
d504357
Check readonly in assignments and type relations
ahejlsberg Jan 16, 2016
8319f2e
Accepting new baselines
ahejlsberg Jan 16, 2016
07763ed
Removing unused function
ahejlsberg Jan 17, 2016
5b233e4
Refactor to introduce IndexInfo type
ahejlsberg Jan 17, 2016
b8cd0e5
Support readonly indexers + include readonly modifier in typeToString
ahejlsberg Jan 18, 2016
17b5899
Fixing fourslash test
ahejlsberg Jan 18, 2016
13f763d
Accepting new baselines
ahejlsberg Jan 18, 2016
2a20e91
Allow assignments to readonly properties in constructors
ahejlsberg Jan 19, 2016
01c9686
Allow 'readonly' only on property and index signature declarations
ahejlsberg Jan 19, 2016
d3be38e
Updating error messages
ahejlsberg Jan 19, 2016
723475b
Accepting new baselines
ahejlsberg Jan 19, 2016
a499607
Merge branch 'master' into readonlyMembers
ahejlsberg Jan 19, 2016
dc8ab95
Chaning "read-write" to "writable" in error messages
ahejlsberg Jan 19, 2016
4abf717
Accepting new baselines
ahejlsberg Jan 19, 2016
cac3a32
Add ReadonlyArray<T> to core.d.ts
ahejlsberg Jan 19, 2016
8bb00fe
Consider ReadonlyArray<T> an array-like type
ahejlsberg Jan 19, 2016
fc6947b
Make get only accessor compatible with writable property in type rela…
ahejlsberg Jan 21, 2016
9562353
Fixing fourslash test
ahejlsberg Jan 21, 2016
b6f43e6
Accepting new baselines
ahejlsberg Jan 21, 2016
fac1bf6
Disallow assigments to exported variables from external modules
ahejlsberg Jan 22, 2016
e506378
Accepting new baselines
ahejlsberg Jan 22, 2016
ee0060b
No readonly checks in type relationships + No assignments through nam…
ahejlsberg Jan 23, 2016
7405a4b
Accepting new baselines
ahejlsberg Jan 23, 2016
49dd54e
Include readonly in type equality checks + Treat more symbols as read…
ahejlsberg Jan 24, 2016
ea4e3af
Fix tests
ahejlsberg Jan 24, 2016
c78ee72
Accepting new baselines
ahejlsberg Jan 24, 2016
c826a90
Merge branch 'master' into readonlyMembers
ahejlsberg Jan 24, 2016
7561642
Adding const/readonly to core.d.ts and es6.d.ts
ahejlsberg Jan 24, 2016
0b1f0d8
Accepting new baselines
ahejlsberg Jan 24, 2016
77d174a
Adding tests
ahejlsberg Jan 25, 2016
da107fe
Accepting new baselines
ahejlsberg Jan 25, 2016
cbb195b
Renumbering NodeFlags to start at 1 << 0
ahejlsberg Jan 27, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Accepting new baselines
ahejlsberg committed Jan 19, 2016
commit 4abf717cefe54d58d296d599f9a81bf26342b407
8 changes: 4 additions & 4 deletions tests/baselines/reference/interfaceImplementation5.errors.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
tests/cases/compiler/interfaceImplementation5.ts(5,7): error TS2420: Class 'C1' incorrectly implements interface 'I1'.
Property 'getset1' is read-only in type 'C1' but read-write in type 'I1'.
Property 'getset1' is read-only in type 'C1' but writable in type 'I1'.
tests/cases/compiler/interfaceImplementation5.ts(6,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/interfaceImplementation5.ts(10,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/interfaceImplementation5.ts(14,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/interfaceImplementation5.ts(15,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/interfaceImplementation5.ts(18,7): error TS2420: Class 'C4' incorrectly implements interface 'I1'.
Property 'getset1' is read-only in type 'C4' but read-write in type 'I1'.
Property 'getset1' is read-only in type 'C4' but writable in type 'I1'.
tests/cases/compiler/interfaceImplementation5.ts(19,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/interfaceImplementation5.ts(23,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/interfaceImplementation5.ts(27,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
@@ -20,7 +20,7 @@ tests/cases/compiler/interfaceImplementation5.ts(28,16): error TS1056: Accessors
class C1 implements I1 {
~~
!!! error TS2420: Class 'C1' incorrectly implements interface 'I1'.
!!! error TS2420: Property 'getset1' is read-only in type 'C1' but read-write in type 'I1'.
!!! error TS2420: Property 'getset1' is read-only in type 'C1' but writable in type 'I1'.
public get getset1(){return 1;}
~~~~~~~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
@@ -44,7 +44,7 @@ tests/cases/compiler/interfaceImplementation5.ts(28,16): error TS1056: Accessors
class C4 implements I1 {
~~
!!! error TS2420: Class 'C4' incorrectly implements interface 'I1'.
!!! error TS2420: Property 'getset1' is read-only in type 'C4' but read-write in type 'I1'.
!!! error TS2420: Property 'getset1' is read-only in type 'C4' but writable in type 'I1'.
public get getset1(){var x:any; return x;}
~~~~~~~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.