Typescript 3.7 includes a flag that will allow people to migrate to the
Class Fields ECMA proposal as currently specified, which is at Stage 3.
When `--useDefineForClassFields` is turned on, Typescript
issues 3 new errors in places where the current Typescript semantics
would cause errors with the Stage 3 spec.
Two of the errors are very rare. The third shows up whenever classes want
to redeclare the type of a property from a superclass, usually when the
base property's type is `any` or `unknown`.
```ts
class ColumnSizerExample extends React.Component<any, any> {
context: React.ContextType<typeof MyContext>
}
```
Without `--useDefineForClassFields`, this *only* redeclares the type of
`context`. With `--useDefineForClassFields`, it redeclares the type of
`context` **and** initialises it to `undefined`. This is very surprising.
To avoid this, Typescript 3.7 introduces new syntax for exactly this scenario:
```ts
class ColumnSizerExample extends React.Component<any, any> {
declare context: React.ContextType<typeof MyContext>
}
```
However, Definitely Typed tests cannot use this new syntax because it
only works with Typescript 3.7, which isn't even in beta until next
week. So this PR uses several other workarounds instead:
1. Moving a constructor initialiser to a property declaration initialiser.
2. Using a dummy initialiser:
3. Adding type annotations so the type of the base property can be correctly inferred.
4. Deleting the declaration when it has the same type as the base. In this case it's redundant.
* add required property children to Props
* name function arguments for onCopy
* put required props before optional
* make all Options attributes optional and add format
* extend and add tests
* indicate lib version for these types and add contributor
* [react-calendar-timeline] Updated types to version 0.24.6
- Added absent types
- More test cases
- removed old non existent now props
* - few changes after review
* - few changes after review
* - test fix
* - fixes to header
* - fixes to labelFormat typings
* - fixes to labelFormat typings
* - fixes to typings
* returned object from defaults cannot be null/undefiend
* Update object.d.ts
* Update object.d.ts
* not required on any
* Update object.d.ts
* regenerate fp version
* add type definitions for channelgroup methods to pubnub type definitions
* fix the code formatting after husky configs butchered it
* add tests
* check in auto-formatted code
* Added type definitions for use-combined-reducers
* fixed errors
* fixed typo
* deleted typescript version declaration
* defined the same typescript version as react
* Started adding types.
* Missed these changes.
* Adding types.
* Should be good.
* Should be good to go.
* Updated prettier formatting.
* Updated prettier formatting.
* Updated prettier.
* Changed to ReadonlyArray.
* Modified as per review.
* Modified with other recommended changes.
* fix for error enum declaration
- moved error enum declaration outside of Parse context
- changed `const enum` to `declare enum`
- added static vars for enum fields to Error class
* added test for errors
* added xml-c14n typing
* reworked tests; added test run to package.json
* formatting fix
* removed package.json
* added info
* fixed errors
* rewrote typing
* reworked version
* added compile flag
* corrected export
* corrected export
* corrected tsconfig
* set noImplicitAny to false
* set other options to false
* returned back options which were turned off by mistake
* fixed typing according to review comment
* 17.2.0.34 added
* Added non-npm package
* Removed space
* added new line
added ew line
* Changed the word
* 17.2.0.46 added
* Removed blank line and added non-npm entry
* changed Encoding format
* 17.3.0.9-beta added
* added npm packages
added npm packages
* added npm packages
* format changes
* format changed
format changed
* Format changed to ANSI
* Update mongoose-paginate & mongoose-paginate-v2 populate types
* Add QueryPopulateOptions
* Upgrade typescript to 2.8 as the tslint does not succeed with the 2.3
Previously, it used process.Readable/Writeable. But its tests show that the
constructor is meant to take process.stdin, which is a ReadStream. Until
recently, the two types were mistakenly assignable. Now that they are
not, I think the type should be ReadableStream, which is a common
supertype of process.Readable and ReadStream.
Decoder can be built standalone (is part of the actual public interface
and part of the performance-test interface described in the README.md of
the project). Moreover, Decoder is an event emitter. The interface has
been update accordingly.
* Update index.d.ts
Member "locale" of interface "JsonDataHeader" was renamed to "language".
* Update gettext.js-tests.ts
Updated test according to type definition changes.
* Updated version number to 0.8
* Move Func helper to jasmine namespace
* Move ImplementationCallback to jasmine namespace
* Align tests between different versions
* Fix typings for spyOnAllFunctcions
* Improve typing for function matchers
* Refactor AsymmetricMatcher to handle all cases
* Enhance basic expectation docs and typing
Improve toBe(), toEqual(), toMatch(), toHaveClass()
documentation to avoid confusion around them.
* Enhance any() and anything()
* Add missing typing for non-named spy object
* Specify that jasminewd2 depends on jasmine v2
The jasminewd2 library supports jasmine 2 only,
therefore point typings to the correct reference.
* Add NonTypedSpyObj for complex scenarios
* Improve tool for spy names extraction
* Remove undefined Any property from matchers
* react-helmet: remove default export
This package does not have a default export.
* react-helmet-async: bump typescript version
This depends on react, which has typescript version 2.8, so this
package has to be updated to match.