diff --git a/package.json b/package.json index 204bd55..a834742 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "2.4.0", "description": "JSON parse with prototype poisoning protection", "main": "index.js", - "types": "index.d.ts", + "types": "types/index.d.ts", "scripts": { "benchmark": "cd benchmarks && npm install && npm run all", "lint": "standard", diff --git a/index.d.ts b/types/index.d.ts similarity index 100% rename from index.d.ts rename to types/index.d.ts diff --git a/index.test-d.ts b/types/index.test-d.ts similarity index 97% rename from index.test-d.ts rename to types/index.test-d.ts index 002f2f9..cfccbc9 100644 --- a/index.test-d.ts +++ b/types/index.test-d.ts @@ -1,5 +1,5 @@ import { expectType, expectError } from 'tsd' -import sjson = require('.') +import sjson from '..' expectError(sjson.parse(null)) expectType(sjson.parse('{"anything":0}'))