/* * MIT License * * Copyright (c) 2018 Choko (choko@curioswitch.org) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /* eslint-disable max-classes-per-file */ declare module '@storybook/react/standalone' { interface DevOptions { mode: 'dev'; port: number; configDir: string; } interface StaticOptions { mode: 'static'; configDir: string; outputDir: string; } function storybook(options: DevOptions | StaticOptions): Promise; export = storybook; } // TODO(choko): Figure out why @types/intl isn't enough. declare module 'intl' {} declare module 'intl/locale-data/jsonp/*.js' {} declare module 'jest-cli' { export interface Argv { config: string; watch: boolean; } export async function run(maybeArgv?: string[]); } declare module '*.json' { const value: { version: string; }; export = value; } declare module 'autodll-webpack-plugin' { import { Plugin, Plugin, Plugin, Plugin, Plugin, Configuration, Stats, } from 'webpack'; interface Entry { [key: string]: string[]; } interface Args { entry?: Entry; filename?: string; context?: string; inject?: boolean; path?: string; debug?: boolean; plugins?: Plugin[]; inherit?: boolean; } class AutoDllPlugin extends Plugin { constructor(args: Args); } export = AutoDllPlugin; } declare module 'brotli-webpack-plugin' { interface Args { asset: string; test: RegExp; threshold: number; minRatio: number; } class BrotliPlugin extends Plugin { constructor(args: Args); } export = BrotliPlugin; } declare module 'html-to-react' { import { Component } from 'react'; export class Parser { public parse(html: string): Component; } } declare module 'koa-proxies' {} declare module 'react-loadable/webpack' { interface Args { filename: string; } export class ReactLoadablePlugin extends Plugin { constructor(args: Args); } } declare module 'static-site-generator-webpack-plugin' { interface Args { entry: string; paths: string[]; locals: any; globals: any; } class StaticSiteGeneratorPlugin extends Plugin { constructor(args: Args); } export = StaticSiteGeneratorPlugin; } declare module 'favicons-webpack-plugin' { interface Args { logo: string; devMode?: string; inject?: boolean; prefix?: string; emitStats?: boolean; statsFilename?: string; persistentCache?: boolean; } class FaviconsPlugin extends Plugin { constructor(args: Args); } export = FaviconsPlugin; } declare module 'webpack-sane-compiler' { class SaneCompiler { public run(): Promise<{ stats: Stats }>; } function saneWebpack(config: Configuration): SaneCompiler; export = saneWebpack; } declare module 'webpack-sane-compiler-reporter' { import { SaneCompiler } from 'webpack-sane-compiler'; function startReporting(compiler: SaneCompiler): any; export = startReporting; } declare module 'module-alias' { type Callback = (fromPath: string, request: string, alias: string) => string; export function addAlias(alias: string, callback: Callback); }