For discussions on DefinitelyTyped/DefinitelyTyped/pull/28890
- Install dependencies
$ npm install- Compile
index.tsand you'll see no error.
$ npm run tsc index.ts$ npm installindex.ts and you'll see no error.$ npm run tsc index.ts| const x: ValidatorJS.IsFQDNOptions = { | |
| require_tld: true, | |
| allow_underscores: true, | |
| allow_trailing_dot: true | |
| }; |
| { | |
| "name": "validatorjs-types-considerations", | |
| "version": "0.0.0", | |
| "lockfileVersion": 1, | |
| "requires": true, | |
| "dependencies": { | |
| "@types/validator": { | |
| "version": "9.4.2", | |
| "resolved": "https://registry.npmjs.org/@types/validator/-/validator-9.4.2.tgz", | |
| "integrity": "sha512-v6H2QH+oXVdLKp9keOJi5LQSt6X5/XIOtK1YmbCzvkAT2kHW9WyQkixit9w1UgJpBGrDCqqCZlQ+Qucpmsf8hA==", | |
| "dev": true | |
| }, | |
| "typescript": { | |
| "version": "3.0.3", | |
| "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.0.3.tgz", | |
| "integrity": "sha512-kk80vLW9iGtjMnIv11qyxLqZm20UklzuR2tL0QAnDIygIUIemcZMxlMWudl9OOt76H3ntVzcTiddQ1/pAAJMYg==", | |
| "dev": true | |
| }, | |
| "validator": { | |
| "version": "10.7.1", | |
| "resolved": "https://registry.npmjs.org/validator/-/validator-10.7.1.tgz", | |
| "integrity": "sha512-tbB5JrTczfeHKLw3PnFRzGFlF1xUAwSgXEDb66EuX1ffCirspYpDEZo3Vc9j38gPdL4JKrDc5UPFfgYiw1IWRQ==" | |
| } | |
| } | |
| } |
| { | |
| "name": "validatorjs-types-considerations", | |
| "version": "0.0.0", | |
| "description": "", | |
| "main": "index.js", | |
| "scripts": { | |
| "tsc": "./node_modules/.bin/tsc", | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "author": "Naoto Yokoyama", | |
| "license": "MIT", | |
| "dependencies": { | |
| "validator": "^10.7.1" | |
| }, | |
| "devDependencies": { | |
| "@types/validator": "^9.4.2", | |
| "typescript": "^3.0.3" | |
| } | |
| } |