Added Edmonds-Blossom type (#34741)

* Added Edmonds-Blossom type

* updated tsconfig

* fixed tsconfig.json

* added noEmit

* added forceConsistentCasingInFileNames

* fixed urls

* fixed types

* fixed lib

* added tests

* fixed tests

* fixed test

* added ts version

* fix test
This commit is contained in:
John Jackson 2019-04-17 18:28:46 -04:00 committed by Armando Aguirre
parent 9dccfb693f
commit a0cde1d10f
4 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,7 @@
import blossom from "edmonds-blossom";
const data = [
[0, 1, 6],
[0, 2, 10],
[1, 2, 5]
];
blossom(data); // $ExpectType number[]

7
types/edmonds-blossom/index.d.ts vendored Normal file
View File

@ -0,0 +1,7 @@
// Type definitions for edmonds-blossom 1.0
// Project: https://github.com/mattkrick/EdmondsBlossom
// Definitions by: John Jackson <https://github.com/johnridesabike>
// Definitions: https://github.com/DefinitelyTyped/edmonds-blossom
// TypeScript Version: 2.7
export = blossom;
declare function blossom(edges: number[][], maxCardinality?: number): number[];

View File

@ -0,0 +1,24 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"esModuleInterop": true
},
"files": [
"index.d.ts",
"edmonds-blossom-tests.ts"
]
}

View File

@ -0,0 +1,3 @@
{
"extends": "dtslint/dt.json"
}