Skip to content

Import in Definition File Hides Interfaces #3857

@pixelshaded

Description

@pixelshaded

I'm trying to merge some missing methods from https://github.com/borisyankov/DefinitelyTyped/blob/master/i18next/i18next.d.ts for my node server.

interface IWebTranslateOptions {
  i18nextWTOptions: {
    languages: Array<string>;
    namespaces: Array<string>;
    resGetPath: string;
    resChangePath: string;
    resRemovePath: string;
    fallbackLng: string;
    dynamicLoad: boolean;
  }
}

interface I18nextStatic {
  serveClientScript(app: any): I18nextStatic;
  serveDynamicResources(app: any): I18nextStatic;
  serveMissingKeyRoute(app: any): I18nextStatic;
  serveChangeKeyRoute(app: any): I18nextStatic;
  serveRemoveKeyRoute(app: any): I18nextStatic;
  serveWebTranslate(app: any, options: IWebTranslateOptions): I18nextStatic;
}

This compiles and works, however I'd like to change all those app any types to express types. If I add

import express = require('express');

to the file, the compiler says it can't find the other interfaces anymore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionAn issue which isn't directly actionable in code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions