Implement as ts module and compile to js + d.ts file
To avoid the complications of separately implementing a JS module
and writing types for it and having consumers of the module do the
type definition assignement the module is now a typescript module which
compiles to javascript + a type definition file.
Signed-off-by:
Snorre Magnus Davøen <snorre.davoen@nsd.uib.no>
Showing
index.js
deleted
100644 → 0
index.ts
0 → 100644
{ | ||
"name": "log-schema-node", | ||
"version": "1.0.0", | ||
"main": "./log-schema/log-schema.json", | ||
"types": "types", | ||
"main": "lib/index.js", | ||
"types": "lib/index", | ||
"scripts": { | ||
"dtslint": "dtslint types" | ||
"compile": "tsc" | ||
}, | ||
"repository": "git@gitlab.nsd.uib.no:nsd-commons/log-schema-node.git", | ||
"author": "Snorre Magnus Davøen <snorre.davoen@nsd.uib.no>", | ||
"license": "See LICENSE", | ||
"files": [ | ||
"lib/index.d.ts", | ||
"lib/index.js", | ||
"log-schema/log-schema.json" | ||
], | ||
"devDependencies": { | ||
"dtslint": "Microsoft/dtslint#production", | ||
"jayschema": "^0.3.1", | ||
"json-schema-to-typescript": "^4.2.0", | ||
"dtslint": "Microsoft/dtslint#production" | ||
"tslint": "^5.2.0", | ||
"typescript": "^2.3.2" | ||
} | ||
} |
test/test.ts
0 → 100644
tsconfig.json
0 → 100644
tslint.json
0 → 100644
types/index.d.ts
deleted
100644 → 0
types/test.ts
deleted
100644 → 0
types/tsconfig.json
deleted
100644 → 0
types/tslint.json
deleted
100644 → 0
typings.d.ts
0 → 100644
Please register or sign in to comment