Skip to content

Renamed shape to array shape, removed useless types methods - #18

Merged
vudaltsov merged 2 commits into
0.3.xfrom
shape-and-types-refactoring
Sep 29, 2023
Merged

Renamed shape to array shape, removed useless types methods#18
vudaltsov merged 2 commits into
0.3.xfrom
shape-and-types-refactoring

Conversation

@vudaltsov

Copy link
Copy Markdown
Member

This is mostly needed in preparation for ObjectShape.

Comment thread src/TypeVisitor.php Outdated
$_emptyShape = extractType(new ArrayShapeType());

/** @var ArrayShapeType<array{a?: string, 10: int}> */
$_shapeType = new ArrayShapeType([

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this test really work?
This type cannot be inferred without a plugin.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't, that's why there is a @var forced type above :)

@vudaltsov
vudaltsov merged commit 6bb90aa into 0.3.x Sep 29, 2023
@vudaltsov
vudaltsov deleted the shape-and-types-refactoring branch September 29, 2023 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants