- Automatically adds
@types/
packages into your dependencies when you add a package that doesn't include its own types - Adds support for
types
topublishConfig
(same behavior aspublishConfig.bin
)
yarn plugin import typescript
β― yarn/packages/plugin-typescript β― yarn add lodash
β€ YN0000: β Resolution step
β€ YN0000: β Completed in 0.24s
β€ YN0000: β Fetch step
β€ YN0013: β @types/lodash@npm:4.14.121 can't be found in the cache and will be fetched from the remote registry
β€ YN0013: β lodash@npm:4.14.0 can't be found in the cache and will be fetched from the remote registry
β€ YN0000: β Completed in 3.63s
β€ YN0000: β Link step
β€ YN0000: β Completed in 2.75s
β€ YN0000: Done with warnings in 6.81s
As you can see in the fetch step, even though we only added lodash
into our dependencies, Yarn automatically figured out that we would need @types/lodash
, and added it before we ask it to.