Merge pull request #17463 from yairtawil/master

add types for 'wellknown'
This commit is contained in:
Paul van Brenk
2017-06-29 13:42:57 -07:00
committed by GitHub
4 changed files with 37 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
// Type definitions for wellknown 0.5
// Project: https://github.com/mapbox/wellknown#readme
// Definitions by: Yair Tawil <https://github.com/yairtawil>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export function parse(input: string): {};
export function stringify(gj: {}): string;
+22
View File
@@ -0,0 +1,22 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"wellknown-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }
+7
View File
@@ -0,0 +1,7 @@
import * as wellknown from 'wellknown';
wellknown.parse("POINT(1 2)");
const geoJson: {} = {
coordinates: [1, 2],
type: "Point"
};
wellknown.stringify(geoJson);