fix: fix typescript compilation#295
fix: fix typescript compilation#295JustinBeckwith merged 2 commits intogoogleapis:masterfrom JustinBeckwith:typy
Conversation
|
@googleapis/node-team this is an interesting problem, and I'm interested in y'alls opinions :) |
|
Let’s define an interface that contains the properties of File that this library needs. Since we only intend to access the relevant properties and we’re not creating a new File object, we should just provide the interface and note in the docs that a File object can be provided. |
|
I see this problem with TypeScript code once per fortnight. The real solution here would be a way to tell the package installer this info: "If you install this package as a devDependency of a top-level install, you also need to install these other devDependencies of mine". IOW, we need a |
Fixes #287. There are a few places where we accept
Filetype objects, which is defined ingoogle-cloud/storage. The package is only needed for types, so it's installed as adevDependency. However - this means the types for storage aren't shipped with the module, which causes compilation to fail for consumers of the package. This change dumps theFiletype for now in favor ofany, and adds an install test to verify basic compilation works after annpm pack.