1 | # Changelog
|
2 | All notable changes to this project will be documented in this file.
|
3 |
|
4 | The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
5 | and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
6 |
|
7 |
|
8 |
|
9 | ## [1.4.0] - 2018-07-25
|
10 | - Support for ES module imports and exports.
|
11 | - Warnings are now printed with file names, line numbers, and code snippets.
|
12 | - Add `autoImport` config option to automatically add ES module imports when
|
13 | particular identifiers are referenced.
|
14 | - Automatically detect if a project uses NPM or Bower and configure module
|
15 | resolution settings accordingly.
|
16 | - Automatically import/export synthetic mixin constructor interfaces.
|
17 | - Superclasses and mixins are now emitted for classes.
|
18 | - Element super classes are now emitted.
|
19 | - Legacy Polymer elements now extend `LegacyElementMixin` and `HTMLElement`
|
20 | instead of `PolymerElement`.
|
21 | - Mixin instance interfaces now extend the instance interfaces for the mixins
|
22 | that they automatically apply.
|
23 |
|
24 | ## [1.3.0] - 2018-06-29
|
25 | - Generate typings for class constructors.
|
26 | - Add `@ts-ignore` comment if method contains `@suppress {checkTypes}` in jsdoc.
|
27 |
|
28 | ## [1.2.2] - 2018-03-19
|
29 | - Fix bad file path handling which broke Windows support.
|
30 |
|
31 | ## [1.2.1] - 2018-03-09
|
32 | - Fix bug where if a package name was a prefix of one of its dependencies (e.g.
|
33 | `iron-icons` depends on `iron-iconset-svg`), then `<reference>` statements to
|
34 | include that dependency's typings would not be emitted (via
|
35 | https://github.com/Polymer/polymer-analyzer/pull/902).
|
36 |
|
37 | ## [1.2.0] - 2018-02-15
|
38 | - Functions which definitely never return a value will now be automatically
|
39 | inferred as returning `void`.
|
40 | - Getters on Polymer elements defined with the legacy Polymer function are now
|
41 | scanned correctly (previously type annotations were missing, and the readonly
|
42 | bit was inverted.
|
43 |
|
44 | ## [1.1.3] - 2018-02-12
|
45 | - Mixin functions now include all of the additional mixins they automatically
|
46 | apply. Previously, only the immediately applied mixins were accounted for, but
|
47 | not ones that were applied transitively.
|
48 |
|
49 | ## [1.1.2] - 2018-02-08
|
50 | - Elements that are constructable (usually a call to the Polymer function whose
|
51 | result is assigned to some variable) can now have behaviors.
|
52 | - The `--deleteExisting` command line flag will no longer delete `.d.ts` files
|
53 | that are referenced as values in the `addReferences` config option, since such
|
54 | files are typically hand-written.
|
55 |
|
56 | ## [1.1.1] - 2018-02-05
|
57 | - Fix missing `glob` dependency.
|
58 |
|
59 | ## [1.1.0] - 2018-02-05
|
60 | - Added `excludeIdentifiers` config option. Use this to skip emitting any
|
61 | declarations for some feature by its class name, etc.
|
62 | - Renamed `exclude` config option to `excludeFiles` to disambiguate it from
|
63 | `excludeIdentifiers`. `exclude` still works as before for backwards
|
64 | compatibility, but will be removed in the next major version.
|
65 | - Polymer behavior interfaces now extend any additional behaviors that they
|
66 | apply. This is done with an array of behavior objects as documented at
|
67 | https://www.polymer-project.org/1.0/docs/devguide/behaviors#extending.
|
68 | - Added `--deleteExisting` command line flag (default false) which recursively
|
69 | deletes all `.d.ts` files in the output directory before writing new typings,
|
70 | excluding `node_modules/` and `bower_components/`.
|
71 |
|
72 | ## [1.0.1] - 2018-02-01
|
73 | - Always parameterize `Promise`. In Closure `Promise` is valid, but in
|
74 | TypeScript this is invalid and must be `Promise<any>` instead.
|
75 | - Escape `*\` comment end sequences when formatting comments. These turn up in
|
76 | practice when an HTML comment embeds a JavaScript style block comment, like
|
77 | here:
|
78 | https://github.com/PolymerElements/paper-icon-button/blob/master/paper-icon-button.html#L51
|
79 | - Hybrid Polymer elements without a LHS assignment now have `Element` appended
|
80 | to their generated interface name, to match the behavior of the Closure
|
81 | Polymer Pass
|
82 | (https://github.com/google/closure-compiler/wiki/Polymer-Pass#element-type-names-for-1xhybrid-call-syntax).
|
83 | For example, `interface IronRequest` is now `interface IronRequestElement`.
|
84 | - Typings are now emitted for all HTML files, even if they contain no script
|
85 | tags. Added `index.html` to the default `exclude` set (alongside the existing
|
86 | `test/**` and `demo/**` globs).
|
87 |
|
88 | ## [1.0.0] - 2018-01-25
|
89 | - [BREAKING] The `--outDir` flag is now required when using the command line
|
90 | tool. Previously it would print all concatenated typings to `stdout`, which
|
91 | doesn't make much sense given that we emit multiple files.
|
92 | - Rewrite triple-slash references to Polymer into the `types/` directory so that
|
93 | they resolve correctly. Polymer is a special case where we put the typings in
|
94 | a `types/` subdirectory in order not to clutter the repo.
|
95 | - Emit a `const FooBehavior: object` for behaviors. This lets TypeScript know
|
96 | that e.g. `Polymer.AppLocalizeBehavior` is a valid symbol that could be
|
97 | passed, for example, to the `Polymer.mixinBehaviors` function.
|
98 |
|
99 | ## [0.3.6] - 2018-01-09
|
100 | - Support parameterized types other than `Array` and `Object`, such as `Foo<T>`.
|
101 |
|
102 | ## [0.3.5] - 2018-01-02
|
103 | - Properties are now emitted as `readonly` when applicable.
|
104 | - Bump Analyzer for latest scanning features (getters/setters, static methods,
|
105 | methods/properties on class prototypes).
|
106 |
|
107 | ## [0.3.4] - 2017-12-20
|
108 | - Handle optional and rest parameters in function type expressions.
|
109 |
|
110 | ## [0.3.3] - 2017-12-18
|
111 | - Pin Analyzer version for upcoming major refactor.
|
112 |
|
113 | ## [0.3.2] - 2017-12-18
|
114 | - Static methods are now supported on classes, elements, and mixins.
|
115 | - Add `renameTypes` config option, a map of renames to apply to named types that
|
116 | can be configured per-project.
|
117 | - Convert Closure `ITemplateArray` type to TypeScript `TemplateStringsArray`.
|
118 | - Support object index signatures (e.g. `Object<foo, bar>` maps to `{[key: foo]:
|
119 | bar}`).
|
120 |
|
121 | ## [0.3.1] - 2017-12-15
|
122 | - Convert Closure `Object` to TypeScript `object`.
|
123 | - Use glob patterns instead of RegExps to exclude files.
|
124 | - Bump Analyzer version to include
|
125 | https://github.com/Polymer/polymer-analyzer/pull/791 which makes Polymer
|
126 | properties possibly `null|undefined`.
|
127 |
|
128 | ## [0.3.0] - 2017-12-12
|
129 | - `void` is not nullable.
|
130 | - Support constructor functions (e.g. `function(new:HTMLElement, string)`).
|
131 | - Support record types (e.g. `@param {{foo: bar}}`).
|
132 | - Include method `@return` descriptions.
|
133 |
|
134 | ## [0.2.0] - 2017-12-08
|
135 | - Many fixes. See
|
136 | https://github.com/Polymer/gen-typescript-declarations/issues/23.
|
137 |
|
138 | ## [0.1.0] - 2017-11-09
|
139 | - Initial release on NPM.
|