-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated typings #213
base: main
Are you sure you want to change the base?
Updated typings #213
Conversation
Not that I necessarily disagree with your styling changes, but it seems like a pretty sure way to get this PR rejected/ignored. I would love to see this change incorporated since the current interface is wildly incorrect compared to the docs. Maybe resubmit with only the meaningful changes? Edit Any reason we can't just use that instead of duplicating it? |
0db0bf4
to
2eb4ab7
Compare
sorry for the automated formatting, is now gone. The linked interface |
what is the status with that? we would also need correct typings. |
I'm working on updates to deluan/contentful-migrate right now, and am finding that I need to recreate a lot of type information that already exists in this library. In addition to being a lot of work, duplicating that information makes my work fragile. It can easily become out of sync when the types inside contentful-migration change. If you add this flag, the type declarations (.d.ts files) will become part of the npm package, letting me depend on them without rewriting them by hand. In contentful#213, @chrislambe comments: > It looks like the interface we want is defined [in the source]. Any > reason we can't just use that instead of duplicating it? The answer to his question is that the declarations are not made available in the npm package. This PR will fix his problem as well as mine.
I'm working on updates to deluan/contentful-migrate right now, and am finding that I need to recreate a lot of type information that already exists in this library. In addition to being a lot of work, duplicating that information makes my work fragile. It can easily become out of sync when the types inside contentful-migration change. If you add this flag, the type declarations (.d.ts files) will become part of the npm package, letting me depend on them without rewriting them by hand. In #213, @chrislambe comments: > It looks like the interface we want is defined [in the source]. Any > reason we can't just use that instead of duplicating it? The answer to his question is that the declarations are not made available in the npm package. This PR will fix his problem as well as mine.
Summary
Add missing sourceContentType and targetContentType in interface of transformEntriesToType params + enable
undefined
as a return value inderiveEntryForLocale
.Description
contentType: string;
was replaced withundefined
was added as accepted return value inderiveEntryForLocale
.Motivation and Context
Make current functionalities consistent with the typings.