You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that when doing an autoimport in TS, code seems to prefer deep imports over shallow ones.
I.e. when working with graphql, if you try and import GraphQLString, code places this import import { GraphQLString } from 'graphql/type/scalars'; instead of using the import on the base package import { GraphQLString } from 'graphql';.
It would be good if code could detect this and prefer shallow imports where possible.
Esp with node module imports, because doing a deep import can technically be fragile (i.e. a module author may not intend you to import from one of the modules' internal folders).
The text was updated successfully, but these errors were encountered:
I noticed that when doing an autoimport in TS, code seems to prefer deep imports over shallow ones.
I.e. when working with
graphql
, if you try and importGraphQLString
, code places this importimport { GraphQLString } from 'graphql/type/scalars';
instead of using the import on the base packageimport { GraphQLString } from 'graphql';
.It would be good if code could detect this and prefer shallow imports where possible.
Esp with node module imports, because doing a deep import can technically be fragile (i.e. a module author may not intend you to import from one of the modules' internal folders).
The text was updated successfully, but these errors were encountered: