diff --git a/README.md b/README.md index d3f59fb..13f75f7 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,9 @@ Issues can be funded by anyone and the money will be transparently distributed t ### `Primitive` -Type representing primitive types in TypeScript: `number | boolean | string | symbol` +Type representing primitive types in JavaScript, and thus TypeScript: `number | bigint | boolean | string | symbol` + +You can test for singular of these types with [`typeof`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof) [⇧ back to top](#table-of-contents) diff --git a/package.json b/package.json index 51338d4..bedaffe 100644 --- a/package.json +++ b/package.json @@ -21,13 +21,13 @@ "ci-check": "npm run prettier && npm run lint && npm run tsc && npm run test", "reinstall": "rm -rf node_modules/ dist/ && npm install", "prettier": "prettier --list-different 'src/**/*.ts' || (echo '\nPlease fix code formatting by running:\nnpm run prettier:fix\n'; exit 1)", - "prettier:fix": "prettier --write 'src/**/*.ts'", - "lint": "tslint --project './tsconfig.json'", + "prettier:fix": "prettier --write src/**/*.ts", + "lint": "tslint --project ./tsconfig.json", "tsc": "tsc -p . --noEmit", "tsc:watch": "tsc -p . --noEmit -w", "test": "jest --config jest.config.json", "test:watch": "jest --config jest.config.json --watch", - "test:update": "jest --config jest.config.json --no-cache -u && dts-jest-remap ./src/*.spec.ts --rename '{{basename}}.snap.{{extname}}'", + "test:update": "jest --config jest.config.json --no-cache -u && dts-jest-remap ./src/*.spec.ts --rename {{basename}}.snap.{{extname}}", "prebuild": "rm -rf dist/", "build": "tsc -p ./tsconfig.build.json --outDir dist/", "prepublishOnly": "npm run reinstall && npm run ci-check && npm run build" diff --git a/src/mapped-types.ts b/src/mapped-types.ts index e9d5736..864d001 100644 --- a/src/mapped-types.ts +++ b/src/mapped-types.ts @@ -5,14 +5,14 @@ /** * Primitive - * @desc Type representing primitive types in TypeScript: `number | boolean | string | symbol` + * @desc Type representing primitive types in TypeScript: `number | bigint | boolean | string | symbol` * @example - * type Various = number | boolean | string | symbol | object; + * type Various = number | string | object; * * // Expect: object - * Exclude + * type Cleaned = Exclude */ -export type Primitive = number | boolean | string | symbol; +export type Primitive = number | bigint | boolean | string | symbol; /** * Falsey