type-fest
Advanced tools
Comparing version 0.8.1 to 0.9.0
{ | ||
"name": "type-fest", | ||
"version": "0.8.1", | ||
"version": "0.9.0", | ||
"description": "A collection of essential TypeScript types", | ||
"license": "(MIT OR CC0-1.0)", | ||
"repository": "sindresorhus/type-fest", | ||
"funding": "https://github.com/sponsors/sindresorhus", | ||
"author": { | ||
@@ -34,8 +35,9 @@ "name": "Sindre Sorhus", | ||
"devDependencies": { | ||
"@sindresorhus/tsconfig": "^0.4.0", | ||
"@typescript-eslint/eslint-plugin": "^2.2.0", | ||
"@typescript-eslint/parser": "^2.2.0", | ||
"eslint-config-xo-typescript": "^0.18.0", | ||
"@sindresorhus/tsconfig": "^0.7.0", | ||
"@typescript-eslint/eslint-plugin": "2.17.0", | ||
"@typescript-eslint/parser": "2.17.0", | ||
"eslint-config-xo-typescript": "^0.24.1", | ||
"tsd": "^0.7.3", | ||
"xo": "^0.24.0" | ||
"typescript": "3.7.5", | ||
"xo": "^0.25.3" | ||
}, | ||
@@ -42,0 +44,0 @@ "xo": { |
@@ -26,3 +26,2 @@ <div align="center"> | ||
## Install | ||
@@ -36,3 +35,2 @@ | ||
## Usage | ||
@@ -52,3 +50,2 @@ | ||
## API | ||
@@ -75,3 +72,3 @@ | ||
- [`RequireAtLeastOne`](source/require-at-least-one.d.ts) - Create a type that requires at least one of the given keys. | ||
- [`RequireExactlyOne`](source/require-one.d.ts) - Create a type that requires exactly a single key of the given keys and disallows more. | ||
- [`RequireExactlyOne`](source/require-exactly-one.d.ts) - Create a type that requires exactly a single key of the given keys and disallows more. | ||
- [`PartialDeep`](source/partial-deep.d.ts) - Create a deeply optional version of another type. Use [`Partial<T>`](https://github.com/Microsoft/TypeScript/blob/2961bc3fc0ea1117d4e53bc8e97fa76119bc33e3/src/lib/es5.d.ts#L1401-L1406) if you only need one level deep. | ||
@@ -89,3 +86,2 @@ - [`ReadonlyDeep`](source/readonly-deep.d.ts) - Create a deeply immutable version of an `object`/`Map`/`Set`/`Array` type. Use [`Readonly<T>`](https://github.com/Microsoft/TypeScript/blob/2961bc3fc0ea1117d4e53bc8e97fa76119bc33e3/src/lib/es5.d.ts#L1415-L1420) if you only need one level deep. | ||
## Declined types | ||
@@ -98,3 +94,2 @@ | ||
## Tips | ||
@@ -112,3 +107,3 @@ | ||
[Playground](https://typescript-play.js.org/?target=6#code/KYOwrgtgBAMg9gcxsAbsANlA3gKClAeQDMiAaPKAEWACMwFz8BRAJxbhcagDEBDAF17ocAXxw4AliH7AWRXgGNgUAHJwAJsADCcEEQkJsFXgAcTK3hGAAuKAGd+LKQgDcFEx363wEGrLf46IjIaOi28EioGG5iOArovHZ2qhrAAIJmAEJgEuiaLEb4Jk4oAsoKuvoIYCwCErq2apo6egZQALyF+FCm5pY2UABETelmg1xFnrYAzAAM8xNQQZGh4cFR6AB0xEQUIm4UFa0IABRHVbYACrws-BJCADwjLVUAfACUXfhEHFBnug4oABrYAATygcCIhBoACtgAp+JsQaC7P9ju9Prhut0joCwCZ1GUAGpCMDKTrnAwAbWRPWSyMhKWalQMAF0Dtj8BIoSd8YSZCT0GSOu1OmAQJp9CBgOpPkc7uBgBzOfwABYSOybSnVWp3XQ0sF04FgxnPFkIVkdKB84mkpUUfCxbEsYD8GogKBqjUBKBiWIAen9UGut3u6CeqReBlePXQQQA7skwMl+HAoMU4CgJJoISB0ODeOmbvwIVC1cAcIGmdpzVApDI5IpgJscNL49WMiZsrl8id3lrzScsD0zBYrLZBgAVOCUOCdwa+95uIA) | ||
[Playground](https://www.typescriptlang.org/play/#code/JYOwLgpgTgZghgYwgAgHIHsAmEDC6QzADmyA3gLABQyycADnanALYQBcyAzmFKEQNxUaddFDAcQAV2YAjaIMoBfKlQQAbOJ05osEAIIMAQpOBrsUMkOR1eANziRkCfISKSoD4Pg4ZseAsTIALyW1DS0DEysHADkvvoMMQA0VsKi4sgAzAAMuVaKClY2wPaOknSYDrguADwA0sgQAB6QIJjaANYQAJ7oMDp+LsQAfAAUXd0cdUnI9mo+uv6uANp1ALoAlKHhyGAAFsCcAHTOAW4eYF4gyxNrwbNwago0ypRWp66jH8QcAApwYmAjxq8SWIy2FDCNDA3ToKFBQyIdR69wmfQG1TOhShyBgomQX3w3GQE2Q6IA8jIAFYQBBgI4TTiEs5bTQYsFInrLTbbHZOIlgZDlSqQABqj0kKBC3yINx6a2xfOQwH6o2FVXFaklwSCIUkbQghBAEEwENSfNOlykEGefNe5uhB2O6sgS3GPRmLogmslG1tLxUOKgEDA7hAuydtteryAA) | ||
@@ -127,2 +122,6 @@ ```ts | ||
private updateConfig<Key extends keyof NodeConfig>(key: Key, value: NodeConfig[Key]) { | ||
this.configuration[key] = value; | ||
} | ||
config(config: Partial<NodeConfig>) { | ||
@@ -138,3 +137,3 @@ type NodeConfigKey = keyof NodeConfig; | ||
this.configuration[key] = updateValue; | ||
this.updateConfig(key, updateValue); | ||
} | ||
@@ -621,3 +620,2 @@ | ||
## Maintainers | ||
@@ -629,3 +627,2 @@ | ||
## License | ||
@@ -635,3 +632,2 @@ | ||
--- | ||
@@ -638,0 +634,0 @@ |
@@ -30,2 +30,4 @@ import {LiteralUnion} from '..'; | ||
export interface DirectoryLocations { | ||
[directoryType: string]: unknown; | ||
/** | ||
@@ -60,4 +62,2 @@ Location for executable scripts. Sugar to generate entries in the `bin` property by walking the folder. | ||
test?: string; | ||
[directoryType: string]: unknown; | ||
} | ||
@@ -228,5 +228,5 @@ | ||
| { | ||
[moduleName: string]: string | undefined; | ||
main?: string; | ||
browser?: string; | ||
[moduleName: string]: string | undefined; | ||
}; | ||
@@ -242,2 +242,9 @@ | ||
}; | ||
/** | ||
Denote which files in your project are "pure" and therefore safe for Webpack to prune if unused. | ||
[Read more.](https://webpack.js.org/guides/tree-shaking/) | ||
*/ | ||
sideEffects?: boolean | string[]; | ||
} | ||
@@ -375,2 +382,9 @@ | ||
url: string; | ||
/** | ||
Relative path to package.json if it is placed in non-root directory (for example if it is part of a monorepo). | ||
[Read more.](https://github.com/npm/rfcs/blob/latest/implemented/0010-monorepo-subdirectory-declaration.md) | ||
*/ | ||
directory?: string; | ||
}; | ||
@@ -411,2 +425,11 @@ | ||
/** | ||
Indicate peer dependencies that are optional. | ||
*/ | ||
peerDependenciesMeta?: { | ||
[packageName: string]: { | ||
optional: true; | ||
}; | ||
}; | ||
/** | ||
Package names that are bundled when the package is published. | ||
@@ -496,7 +519,31 @@ */ | ||
/** | ||
* A set of config values that will be used at publish-time. It's especially handy to set the tag, registry or access, to ensure that a given package is not tagged with 'latest', published to the global public registry or that a scoped module is private by default. | ||
*/ | ||
A set of config values that will be used at publish-time. It's especially handy to set the tag, registry or access, to ensure that a given package is not tagged with 'latest', published to the global public registry or that a scoped module is private by default. | ||
*/ | ||
publishConfig?: { | ||
[config: string]: unknown; | ||
}; | ||
/** | ||
Describes and notifies consumers of a package's monetary support information. | ||
[Read more.](https://github.com/npm/rfcs/blob/latest/accepted/0017-add-funding-support.md) | ||
*/ | ||
funding?: string | { | ||
/** | ||
The type of funding. | ||
*/ | ||
type?: LiteralUnion< | ||
| 'github' | ||
| 'opencollective' | ||
| 'patreon' | ||
| 'individual' | ||
| 'foundation' | ||
| 'corporation', | ||
string | ||
>; | ||
/** | ||
The URL to the funding page. | ||
*/ | ||
url: string; | ||
}; | ||
} & | ||
@@ -503,0 +550,0 @@ PackageJson.NonStandardEntryPoints & |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59095
911
7
632