diff --git a/types/next-seo/index.d.ts b/types/next-seo/index.d.ts index a3542c9fe9..8d7c487393 100644 --- a/types/next-seo/index.d.ts +++ b/types/next-seo/index.d.ts @@ -2,84 +2,83 @@ // Project: https://github.com/garmeeh/next-seo#readme // Definitions by: Thomas Kosiewski // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 import { Component } from "react"; -declare module "next-seo" { - interface INextSeoProps { - config: IConfig; - } - - interface IConfig { - title?: string; - titleTemplate?: string; - description?: string; - canonical?: string; - - dangerouslySetAllPagesToNoIndex?: boolean; - noindex?: boolean; - - twitter?: ITwitter; - facebook?: IFacebook; - openGraph?: IOpenGraph; - } - - interface ITwitter { - cardType?: string; - site?: string; - handle?: string; - } - - interface IFacebook { - appId?: number; - } - - interface IOpenGraph { - url?: string; - type?: string; - title?: string; - description?: string; - images?: ReadonlyArray; - defaultImageHeight?: number; - defaultImageWidth?: number; - locale?: string; - site_name?: string; - - profile?: IOpenGraphProfile; - book?: IOpenGraphBook; - article?: IOpenGraphArticle; - } - - interface IOpenGraphImages { - url?: string, - width?: number, - height?: number, - alt?: string, - } - - interface IOpenGraphProfile { - firstName?: string; - lastName?: string; - username?: string; - gender?: string; - } - - interface IOpenGraphBook { - authors?: ReadonlyArray; - isbn?: string; - releaseDate?: string; - tags?: ReadonlyArray; - } - - interface IOpenGraphArticle { - publishedTime?: string; - modifiedTime?: string; - expirationTime?: string; - - authors?: ReadonlyArray; - section?: string; - tags?: ReadonlyArray; - } - - export default class NextSeo extends Component { } +export interface NextSeoProps { + config: Config; } + +export interface Config { + title?: string; + titleTemplate?: string; + description?: string; + canonical?: string; + + dangerouslySetAllPagesToNoIndex?: boolean; + noindex?: boolean; + + twitter?: Twitter; + facebook?: Facebook; + openGraph?: OpenGraph; +} + +export interface Twitter { + cardType?: string; + site?: string; + handle?: string; +} + +export interface Facebook { + appId?: number; +} + +export interface OpenGraph { + url?: string; + type?: string; + title?: string; + description?: string; + images?: ReadonlyArray; + defaultImageHeight?: number; + defaultImageWidth?: number; + locale?: string; + site_name?: string; + + profile?: OpenGraphProfile; + book?: OpenGraphBook; + article?: OpenGraphArticle; +} + +export interface OpenGraphImages { + url?: string; + width?: number; + height?: number; + alt?: string; +} + +export interface OpenGraphProfile { + firstName?: string; + lastName?: string; + username?: string; + gender?: string; +} + +export interface OpenGraphBook { + authors?: ReadonlyArray; + isbn?: string; + releaseDate?: string; + tags?: ReadonlyArray; +} + +export interface OpenGraphArticle { + publishedTime?: string; + modifiedTime?: string; + expirationTime?: string; + + authors?: ReadonlyArray; + section?: string; + tags?: ReadonlyArray; +} + +export default class NextSeo extends Component { }