From 62a67f916e954f24b6726793d83717dd87977ff0 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Fri, 19 May 2017 16:29:59 -0700 Subject: [PATCH] Move declaration.name change to TS 2.4 --- API-Breaking-Changes.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/API-Breaking-Changes.md b/API-Breaking-Changes.md index 1a845d1..ef60b4a 100644 --- a/API-Breaking-Changes.md +++ b/API-Breaking-Changes.md @@ -2,8 +2,6 @@ - The type `EnumLiteralType` was removed and `LiteralType` is used instead. `LiteralType` also replaces `.text` with a `.value` which may be either a number or string. See [String valued members in enums](https://github.com/Microsoft/TypeScript/pull/15486). -# TypeScript 2.3 - - `Declaration` does not have a `name` property. TypeScript now recognize assignments in .js files as declarations in certain contexts, e.g. `func.prototype.method = function() {..}` will be a declaration of member `method` on `func`. As a result `Declaration` is not guaranteed to have a `name` property as before. A new type was introduced `NamedDeclaration` to take the place of `Declaration`, and `Declaration` moved to be the base type of both `NamedDeclaration` and `BinaryExpression`. Casting to `NamedDeclaration` should be safe for non .js declarations. See https://github.com/Microsoft/TypeScript/pull/15594 for more details.