Skip to content

Commit

Permalink
fix: disallow children from being passed to constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
trezy committed Jun 15, 2024
1 parent ec3b6aa commit 2f25703
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
4 changes: 2 additions & 2 deletions src/typedefs/HostConfig.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/** @typedef {import('./Instance.js').Instance} Instance */
/** @typedef {import('../typedefs/PixiElements.js').PixiElements} PixiElements */
/** @typedef {import('../typedefs/PixiElementsImpl.js').PixiElementsImpl} PixiElementsImpl */

/**
* @typedef {object} HostConfig
* @property {keyof PixiElements} type
* @property {keyof PixiElementsImpl} type
* @property {Record<string, unknown>} props
* @property {Instance} container
* @property {Instance} instance
Expand Down
15 changes: 0 additions & 15 deletions src/typedefs/PixiElements.js

This file was deleted.

3 changes: 1 addition & 2 deletions src/typedefs/PixiElementsImpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { NameOverrides } from '../constants/NameOverrides.js';
/** @typedef {typeof import('pixi.js')} PixiType */

/** @typedef {import('./AutoFilteredKeys.js').AutoFilteredKeys} AutoFilteredKeys */
/** @typedef {import('./PixiElements.js').PixiElements} PixiElements */
/** @typedef {import('./PixiOptions.js').PixiOptions} PixiOptions */

/**
Expand All @@ -15,7 +14,7 @@ import { NameOverrides } from '../constants/NameOverrides.js';
* @typedef {{
* [K in AutoFilteredKeys as K extends keyof typeof NameOverrides ? typeof NameOverrides[K] : Uncapitalize<K>]:
* import('react').PropsWithChildren<
* PixiOptionsType<import('./ConstructorParams.js').ConstructorParams<PixiType[K]>>
* Omit<PixiOptionsType<import('./ConstructorParams.js').ConstructorParams<PixiType[K]>>, 'children'>
* & { init?: import('./ConstructorParams.js').ConstructorParams<PixiType[K]> }
* > & import('react').PropsWithRef<{ ref?: import('react').MutableRefObject<InstanceType<PixiType[K]>> }>
* }} PixiElementsImpl
Expand Down

0 comments on commit 2f25703

Please sign in to comment.