mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
[d3-cloud] Support import syntax (#30479)
* Allow importing from `d3-cloud` * Modify export to be CommonJS
This commit is contained in:
committed by
Sheetal Nandi
parent
6d9584582e
commit
9272fc1637
@@ -1,3 +1,12 @@
|
||||
import d3Cloud = require('./index.d');
|
||||
import d3 = require('d3');
|
||||
|
||||
// $ExpectType Cloud<Word>
|
||||
d3Cloud();
|
||||
|
||||
// $ExpectType Cloud<Word>
|
||||
d3.layout.cloud();
|
||||
|
||||
interface ICompTextSize{
|
||||
text:string;
|
||||
size:number;
|
||||
|
||||
Vendored
+2
@@ -5,6 +5,8 @@
|
||||
|
||||
import * as d3 from 'd3';
|
||||
|
||||
export = d3.layout.cloud;
|
||||
|
||||
declare module 'd3' {
|
||||
namespace layout {
|
||||
export function cloud(): Cloud<cloud.Word>;
|
||||
|
||||
Reference in New Issue
Block a user