From 9266e419ed585aab552a4e93bbf14b2c13eed4b7 Mon Sep 17 00:00:00 2001 From: Shenghan Gao Date: Tue, 17 Oct 2017 09:06:08 -0700 Subject: [PATCH] fix export issue for cytoscape (#20616) --- types/cytoscape/cytoscape-tests.ts | 2 +- types/cytoscape/index.d.ts | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/types/cytoscape/cytoscape-tests.ts b/types/cytoscape/cytoscape-tests.ts index 827a9880d3..0b7bac436e 100644 --- a/types/cytoscape/cytoscape-tests.ts +++ b/types/cytoscape/cytoscape-tests.ts @@ -1,5 +1,5 @@ 'use strict'; -import { cytoscape } from 'cytoscape'; +import cytoscape = require('cytoscape'); const parentCSS = { 'padding-top': '10px', diff --git a/types/cytoscape/index.d.ts b/types/cytoscape/index.d.ts index 7b5a9a9dbc..3a618195d1 100644 --- a/types/cytoscape/index.d.ts +++ b/types/cytoscape/index.d.ts @@ -58,19 +58,18 @@ * A number of interfaces contain nothing as they server to collect interfaces. * */ -// export as namespace Cy -// export = cytoscape; +export = cytoscape; +export as namespace cytoscape; -export function cytoscape(options?: cytoscape.CytoscapeOptions): cytoscape.Core; -export function cytoscape(extensionName: string, foo: string, bar: any): cytoscape.Core; +declare function cytoscape(options?: cytoscape.CytoscapeOptions): cytoscape.Core; +declare function cytoscape(extensionName: string, foo: string, bar: any): cytoscape.Core; -export namespace cytoscape { +declare namespace cytoscape { interface Position { x: number; y: number; } - type HtmlElement = any; type CssStyleDeclaration = any; interface ElementDefinition {