google-maps-api-typings
google-maps-api-typings copied to clipboard
Add utility methods types
Should the content of this file be included in the index.d.ts? How do you use/expect to use it in an application?
I was following the convention from the original js package where you would need to import the lib/util.js file if you wanted to use the functions. It does seem to be imported and re-exported in index.js so that could be a valid way to do it in typescript.
These utils are used to encode/decode polylines. This shows up, for example, in the polyline field of a response to the directions API which is a series of points on a map, encoded in a very efficient manner.
Yes, got your point. Anyway I was saying that we should include the content in the main index.d.ts file, including the namespace that tells us where the file is actually located.
Generally speaking, when you create declaration files you are not forced to create a .d.ts for each corresponding js/jsx/ts/tsx file in the same exact location. Declaration files can be bundled together in a single .d.ts, and that's what I was referring to.
Did you test your changes? can you provide a sample? Thanks