Bolisov / google-api-typings-generator

⚠️ This repo is no longer maintained and outdated, use active fork ⚠️
https://github.com/Maxim-Mazurok/google-api-typings-generator
8 stars 5 forks source link

ga.client.analytics has the wrong structure #7

Closed Lucretiel closed 4 years ago

Lucretiel commented 5 years ago

The type signature for gapi.client.analytics (here: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/gapi.client.analytics/index.d.ts) claims the following structure:

gapi.client.metadata
gapi.client.provisioning

etc.

However, the actual structure includes the analytics namespace, like so:

gapi.client.analytics.metadata
gapi.client.analytics.provisioning

etc

moshest commented 4 years ago

Temporary fix:


declare let window: Window & {
  gapi: typeof gapi & {
    client: typeof gapi.client & {
      analytics: {
        data: gapi.client.analytics.DataResource;
        management: gapi.client.analytics.ManagementResource;
        metadata: gapi.client.analytics.MetadataResource;
        provisioning: gapi.client.analytics.ProvisioningResource;
      }
    };
  };
};

const { gapi } = window;
Maxim-Mazurok commented 4 years ago

This repo is abandoned, see #19 and use active fork instead: Maxim-Mazurok/google-api-typings-generator

Please, close this issue if you will, thanks for your cooperation!