* no-op: Run prettier --write on react-router-dom.
* Allow correct "ref" to be passed Link.
"ref" can be used rather than "innerRef" to return a ref to the <a>
element inside of <Link>.
See:
[1]: reacttraining.com/react-router/web/api/Link/innerref-function
Where it says:
> As of React Router 5.1, if you are using React 16 you should not
> need this prop because we forward this ref to the underlying <a>.
> Use a normal ref instead.Allows access to the underlying ref of the
> component.
[2]: https://github.com/ReactTraining/react-router/blob/master/packages/react-router-dom/modules/Link.js#L74-L121
Link is the result of forwardRef rather than an actual React class.
This implies a few things:
1. It is a function (see the return type of
React.ForwardRefExoticComponent) rather than a class
2. Its reference is to an inner <a> element, rather than what's in
React.Component, which is a Ref to the element itself.
This introduces a potential incompatibility where users can't use
"new Link" anymore. But that reflects reality (Link is callable not
newable).
Since Link was previously exported as a class, we need to continue to
support it being used as both a type and a value. Since Link was
exported as a generic, we need to continue to support that. As a result:
1. Link is exported as a function that happens to implement the type
corresponding to the result of
`forwardRef<HTMLAnchorElement, LinkProps<S>>`.
2. Link is still exported as a type (interface) which is the same as
that of the return value of `forwardRef<...>`.
* Make sure Link<S> can be used as a generic.
This is is only supported in TS >= 2.9.
I bumped the minimum TS supported version to 2.9 since 2.8 support ends this
month anyway.
* Apply prettier --write to tests.
* Apply same change (forwardRef) to NavLink.
1. https://reacttraining.com/react-router/web/api/NavLink
NavLink is a version of <Link> with the same props.
2. NavLink is similarly implemented in terms of forwardRef, so all
the justification from the previous commit applies. See:
https://github.com/ReactTraining/react-router/blob/master/packages/react-router-dom/modules/NavLink.js
* To maintain TS 2.8 compatibility, use
React.createElement to test Link<{foo:number}>
and NavLink.
When TS 2.8 compatibility is no longer needed, this CL can be reverted
as-is.
* Add types for baretest 1.0
These files were based on the template written with `npx dts-gen --dt --name baretest --template module`.
* Update baretest’s types for v2.0
* node_modules/knex/types/index.d.ts requires TypeScript 3.4
* Update knex dependency
* Switch to strict: true
* Fix error "Property 'model' has no initializer and is not definitely assigned in the constructor."
* Update Model-instance-related example
* Tests fail with TypeScript 3.5 :-/
* Rename/remove certain lodash functions from Bookshelf v0.10.0
See https://github.com/bookshelf/bookshelf/blob/1.1.1/CHANGELOG.md#breaking-changes-4
* [react-table] Make Columns a union type to make it stricter
* [react-table] Make the CellValue generic and allow columns with a string accessor to type it
* [react-table] Better handle non-typed columns
* [react-table] Update the Readme with a Changelog
* [react-table] Removed the unnecessary wording
* [react-table] Added the guesstimate version of types package to changelog
* [markdown-it] Upgrade for v10.0.0
* [markdown-it]: rollback ts version to 2.0 and complete tests
* [prosemirror-markdown]: fix test due to markdown-it types update
* fix: expose canFetchMore boolean on useInfiniteQuery result
* Update types/react-query/index.d.ts
Co-Authored-By: Igor Oleinikov <igor@oleinikov.ru>
Co-authored-by: Igor Oleinikov <igor@oleinikov.ru>
* Added missing $filter overload
Added missing $filter overload that allows multiple strings to translate and returns an object
* Added v1 dir with stub
* Updated def header
* Added v1/tsconfig.json to make publisher happy
* Added index.d.ts to files
* Added paths per build failure
* Moved paths to the right tsconfig
* Fixed path mapping