Skip to content

Commit

Permalink
Core Data: Import types before exporting them
Browse files Browse the repository at this point in the history
Previously we've been exporting the `Context` and `Updatable` types
from a helper module and also using those types in the same file.
This represents a type violation since we're not importing those
types into the module's namespace.

In this patch we're also importing them before re-exporting them
so that the names are available as we expect.
  • Loading branch information
dmsnell committed Mar 15, 2022
1 parent 05b8a7d commit 8f95063
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core-data/src/entity-types/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Internal dependencies
*/
export type { Context, Updatable } from './helpers';
import type { Context, Updatable } from './helpers';
import type { Attachment } from './attachment';
import type { Comment } from './comment';
import type { MenuLocation } from './menu-location';
Expand All @@ -27,6 +27,7 @@ export type { BaseEntityRecords } from './base-entity-records';
export type {
Attachment,
Comment,
Context,
MenuLocation,
NavMenu,
NavMenuItem,
Expand All @@ -38,6 +39,7 @@ export type {
Sidebar,
Taxonomy,
Theme,
Updatable,
User,
Type,
Widget,
Expand Down

0 comments on commit 8f95063

Please sign in to comment.