Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/d3-collection

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/d3-collection - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

d3-collection/LICENSE

48

d3-collection/index.d.ts

@@ -1,2 +0,2 @@

// Type definitions for D3JS d3-collection module v1.0.1
// Type definitions for D3JS d3-collection module 1.0
// Project: https://github.com/d3/d3-collection/

@@ -6,8 +6,10 @@ // Definitions by: Tom Wanzek <https://github.com/tomwanzek>, Alex Ford <https://github.com/gustavderdrache>, Boris Yankov <https://github.com/borisyankov>

// Last module patch version validated against: 1.0.1
/**
* Reference type things that can be coerced to string implicitely
*/
type Stringifiable = {
export interface Stringifiable {
toString(): string;
};
}

@@ -18,10 +20,13 @@ // ---------------------------------------------------------------------

export function keys(object: { [key: string]: any }): Array<string>;
export function keys(object: Object): Array<string>;
export function keys(object: { [key: string]: any }): string[];
// TODO: When upgrading definitions to use TS 2.2+, use "object" data type in next line
export function keys(object: any): string[];
export function values<T>(object: { [key: string]: T }): Array<T>;
export function values(object: Object): Array<any>;
export function values<T>(object: { [key: string]: T }): T[];
// TODO: When upgrading definitions to use TS 2.2+, use "object" data type in next line
export function values(object: any): any[];
export function entries<T>(object: { [key: string]: T }): Array<{ key: string, value: T }>;
export function entries(object: Object): Array<{ key: string, value: any }>;
// TODO: When upgrading definitions to use TS 2.2+, use "object" data type in next line
export function entries(object: any): Array<{ key: string, value: any }>;

@@ -32,3 +37,2 @@ // ---------------------------------------------------------------------

export interface Map<T> {

@@ -40,4 +44,4 @@ has(key: string): boolean;

clear(): void;
keys(): Array<string>;
values(): Array<T>;
keys(): string[];
values(): T[];
entries(): Array<{ key: string, value: T }>;

@@ -53,4 +57,4 @@ each(func: (value: T, key: string, map: Map<T>) => void): void;

export function map<T>(object: { [key: number]: T }): Map<T>;
export function map<T>(array: Array<T>, key?: (value: T, i?: number, array?: Array<T>) => string): Map<T>;
export function map(object: Object): Map<any>;
export function map<T>(array: T[], key?: (value: T, i?: number, array?: T[]) => string): Map<T>;
export function map(object: any): Map<any>; // TODO: When upgrading definitions to use TS 2.2+, use "object" data type for argument

@@ -61,3 +65,2 @@ // ---------------------------------------------------------------------

export interface Set {

@@ -68,3 +71,3 @@ has(value: string | Stringifiable): boolean;

clear(): void;
values(): Array<string>;
values(): string[];
/**

@@ -80,7 +83,6 @@ * The first and second parameter of the function are both passed

export function set(): Set;
export function set(d3Set: Set): Set;
export function set(array: Array<string | Stringifiable>): Set;
export function set<T>(array: Array<T>, key: (value: T, index?: number, array?: Array<T>) => string): Set;
export function set<T>(array: T[], key: (value: T, index?: number, array?: T[]) => string): Set;

@@ -104,13 +106,15 @@ // ---------------------------------------------------------------------

// if AT LEAST ONE KEY was set. This seems a reasonable constraint in practice, given the intent of the nest operator.
// Otherwise, an additional '| Array<Datum> | RollupType` would have to be added to the union type. This would cover
// Otherwise, an additional '| Datum[] | RollupType` would have to be added to the union type. This would cover
// cases (a) without key or rollup (b) without key but with rollup. However, again, the union types make it cumbersome
// without much gain.
export interface NestedArray<Datum, RollupType> extends Array<{ key: string, values: NestedArray<Datum, RollupType> | Array<Datum> | undefined, value: RollupType | undefined }> { }
export interface NestedMap<Datum, RollupType> extends Map<NestedMap<Datum, RollupType> | Array<Datum> | RollupType> { }
// tslint:disable-next-line:no-empty-interface
export interface NestedArray<Datum, RollupType> extends Array<{ key: string, values: NestedArray<Datum, RollupType> | Datum[] | undefined, value: RollupType | undefined }> { }
// tslint:disable-next-line:no-empty-interface
export interface NestedMap<Datum, RollupType> extends Map<NestedMap<Datum, RollupType> | Datum[] | RollupType> { }
export interface NestedObject<Datum, RollupType> {
[key: string]: NestedObject<Datum, RollupType> | Array<Datum> | RollupType;
[key: string]: NestedObject<Datum, RollupType> | Datum[] | RollupType;
}
interface Nest<Datum, RollupType> {
export interface Nest<Datum, RollupType> {
key(func: (datum: Datum) => string): this;

@@ -117,0 +121,0 @@ sortKeys(comparator: (a: string, b: string) => number): this;

{
"name": "@types/d3-collection",
"version": "1.0.4",
"description": "TypeScript definitions for D3JS d3-collection module v1.0.1",
"version": "1.0.5",
"description": "TypeScript definitions for D3JS d3-collection module",
"license": "MIT",
"author": "Tom Wanzek <https://github.com/tomwanzek>, Alex Ford <https://github.com/gustavderdrache>, Boris Yankov <https://github.com/borisyankov>",
"contributors": [
{
"name": "Tom Wanzek",
"url": "https://github.com/tomwanzek"
},
{
"name": "Alex Ford",
"url": "https://github.com/gustavderdrache"
},
{
"name": "Boris Yankov",
"url": "https://github.com/borisyankov"
}
],
"main": "",

@@ -14,4 +27,5 @@ "repository": {

"dependencies": {},
"typings": "index.d.ts",
"typesPublisherContentHash": "c4d8504bd815db8dd5167a49d121bfc43ae06a1f52e71db8e92ac05ce9bcbd2c"
"peerDependencies": {},
"typesPublisherContentHash": "2242bcd01750617544b02e621d46d2fb679fc1247762ca45e0d26e33f28df411",
"typeScriptVersion": "2.0"
}

@@ -5,12 +5,10 @@ # Installation

# Summary
This package contains type definitions for D3JS d3-collection module v1.0.1 (https://github.com/d3/d3-collection/).
This package contains type definitions for D3JS d3-collection module (https://github.com/d3/d3-collection/).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/d3-collection
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-collection
Additional Details
* Last updated: Mon, 12 Sep 2016 18:59:59 GMT
* File structure: ProperModule
* Library Dependencies: none
* Module Dependencies: none
* Last updated: Fri, 19 May 2017 15:49:31 GMT
* Dependencies: none
* Global values: none

@@ -17,0 +15,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc