Skip to content

Commit

Permalink
refactor: eliminate unnecessary exports from typedefs
Browse files Browse the repository at this point in the history
  • Loading branch information
trezy committed Jun 15, 2024
1 parent 27c099b commit 7511320
Show file tree
Hide file tree
Showing 19 changed files with 25 additions and 21 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/typedefs/AutoFilteredKeys.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
* : never;
* }[keyof PixiType]} AutoFilteredKeys
*/
export const AutoFilteredKeys = {};
export {};
2 changes: 1 addition & 1 deletion src/typedefs/Change.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
* keys: string[],
* ]} Change
*/
export const Change = {};
export {};
2 changes: 1 addition & 1 deletion src/typedefs/ConstructorParams.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* @template {new (...args: any[]) => any} T
* @typedef {ConstructorWithOneParam<T>} ConstructorParams
*/
export const ConstructorParams = {};
export {};
2 changes: 1 addition & 1 deletion src/typedefs/ContainerElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/** @typedef {import('react').ReactElement} ReactElement */

/** @typedef {Container & ReactElement} ContainerElement */
export const ContainerElement = {};
export {};
2 changes: 1 addition & 1 deletion src/typedefs/DiffSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
* @typedef {object} DiffSet
* @property {import('./Change.js').Change[]} changes
*/
export const DiffSet = {};
export {};
2 changes: 1 addition & 1 deletion src/typedefs/EventHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
* @property {import('react').MouseEventHandler<HTMLCanvasElement>} ontouchstart
* @property {import('react').MouseEventHandler<HTMLCanvasElement>} onwheel
*/
export const EventHandlers = {};
export {};
2 changes: 1 addition & 1 deletion src/typedefs/HostConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
* @property {number} timeoutHandle
* @property {-1} noTimeout
*/
export const HostConfig = {};
export {};
2 changes: 1 addition & 1 deletion src/typedefs/HostContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* @typedef {import('pixi.js').Application & BaseHostContainer} HostContainer
* @property {import('./Node.js').Node | null} head
*/
export const HostContainer = {};
export {};
3 changes: 1 addition & 2 deletions src/typedefs/Instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@
*/

/** @typedef {ContainerElement & BaseInstance} Instance */

export const Instance = {};
export {};
2 changes: 1 addition & 1 deletion src/typedefs/InstanceProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
*/

/** @typedef {{ [key: string]: unknown } & BaseInstanceProps} InstanceProps */
export const InstanceProps = {};
export {};
2 changes: 1 addition & 1 deletion src/typedefs/InstanceState.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
* @property {Instance} root
* @property {string} type
*/
export const InstanceState = {};
export {};
9 changes: 7 additions & 2 deletions src/typedefs/MaybeInstance.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
/** @typedef {import('./Instance.js').Instance} Instance */
/** @typedef {import('./InstanceState.js').InstanceState} InstanceState */
/**
* @template T
* @template {keyof T} K
* @typedef {import('./PartialBy.js').PartialBy<T, K>} PartialBy
*/

/** @typedef {import('./PartialBy.js').PartialBy<Instance, '__pixireact'>} MaybeInstance */
export const MaybeInstance = {};
/** @typedef {PartialBy<Instance, '__pixireact'>} MaybeInstance */
export {};
2 changes: 1 addition & 1 deletion src/typedefs/Node.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
* @property {P} props
* @property {Node[]} children
*/
export const Node = {};
export {};
2 changes: 1 addition & 1 deletion src/typedefs/PartialBy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
* @typedef {Omit<T, K> & Partial<Pick<T, K>>} PartialBy
* @see https://stackoverflow.com/a/54178819
*/
export const PartialBy = {};
export {};
2 changes: 1 addition & 1 deletion src/typedefs/PixiElements.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
* ];
* }} PixiElements
*/
export const PixiElements = {};
export {};
4 changes: 2 additions & 2 deletions src/typedefs/PixiElementsImpl.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NameOverrides } from './NameOverrides.js';
import { NameOverrides } from '../constants/NameOverrides.js';

/** @typedef {typeof import('pixi.js')} PixiType */

Expand All @@ -20,4 +20,4 @@ import { NameOverrides } from './NameOverrides.js';
* > & import('react').PropsWithRef<{ ref?: import('react').MutableRefObject<InstanceType<PixiType[K]>> }>
* }} PixiElementsImpl
*/
export const PixiElementsImpl = {};
export {};
2 changes: 1 addition & 1 deletion src/typedefs/PixiOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
* | import('pixi.js').HTMLTextOptions
* } PixiOptions
*/
export const PixiOptions = {};
export {};
2 changes: 1 addition & 1 deletion src/typedefs/TargetKeys.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
* | 'HTMLText'
* } TargetKeys
*/
export const TargetKeys = {};
export {};

0 comments on commit 7511320

Please sign in to comment.