-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
DefinitelyTyped/DefinitelyTyped
#70082Description
In version 16, requiredFieldLogger was renamed to relayFieldLogger. (Commit link)
We are utilizing the latest versions of all relevant packages (react-relay, relay-runtime, @types/relay-runtime):
yarn list v1.22.19
warning Filtering by arguments is deprecated. Please use the pattern option instead.
├─ @types/[email protected]
├─ @types/[email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
However, upon inspecting the type definitions in @types/relay-runtime, it appears that the naming has not been updated, causing issues when passing the logger into the relay environment. To address this, we've implemented a workaround as follows:
import { requiredFieldLogger } from 'path/to/our/logger';
const environment = new Environment({
network,
store,
requiredFieldLogger, // required by the definition of EnvironmentConfig in @types/relay-runtime
// @ts-ignore
relayFieldLogger: requiredFieldLogger, // without this, we encounter a runtime error
});
While some discussions mention similar issues with outdated type definitions (link), they do not directly impact us.
Is there any plan to update the type definitions for version 16? If not, what would be the recommended path for contributing changes to the DefinitelyTyped repository?
nf-wbeck, gajus and damassimaraisr, jmancherje and KayakinCoder
Metadata
Metadata
Assignees
Labels
No labels