Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Using
@psalm-type
and@psalm-import-type
is useful for places with a few uses of an object-like array. However when object-like arrays have been used to imply whole data strctures these imports may be used in hundreds of files and it's extra work to always import them.Has it ever been considered for Psalm to define a "pre-import" list where a set of types can be imported that are considered available globally? This could conflict I guess with other named classes; my view is that if someone wants to use this, then they should maintain a sensible list and if Psalm finds two definitions it should error much like if two imports shared the same name without an alias.
I had wondered if a plugin could provide this - could I write a custom plugin to define a limited set of such data types for our use?
Beta Was this translation helpful? Give feedback.
All reactions