{"_id":"@gilbarbara/types","_rev":"4-13783f008951109f912455c403216e45","name":"@gilbarbara/types","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.0":{"name":"@gilbarbara/types","version":"0.1.0","description":"Reusable typescript typings","author":{"name":"Gil Barbara","email":"gilbarbara@gmail.com"},"keywords":["typescript","typings"],"repository":{"type":"git","url":"git+https://github.com/gilbarbara/types.git"},"bugs":{"url":"https://github.com/gilbarbara/types/issues"},"homepage":"https://github.com/gilbarbara/types","main":"lib/index.js","types":"./lib","sideEffects":false,"license":"MIT","dependencies":{},"devDependencies":{"@gilbarbara/eslint-config":"^0.2.1","@gilbarbara/prettier-config":"^0.1.0","@gilbarbara/tsconfig":"^0.1.0","del-cli":"^4.0.1","husky":"^7.0.4","jest":"^27.5.1","repo-tools":"^0.2.2","ts-node":"^10.7.0","type-fest":"^2.12.2","typescript":"^4.6.3"},"scripts":{"build":"npm run clear && npm run build:lib","build:lib":"tsc","clear":"del lib/*","lint":"eslint --ext .ts,.tsx src","typecheck":"tsc --noEmit","validate":"npm run lint && npm run typecheck && npm run build","prepare":"husky install","prepublishOnly":"npm run validate"},"eslintConfig":{"extends":["@gilbarbara/eslint-config"]},"prettier":"@gilbarbara/prettier-config","gitHead":"73536cbffb3a7ed5c12a7e29073d9c8addbc64c3","_id":"@gilbarbara/types@0.1.0","_nodeVersion":"16.14.2","_npmVersion":"8.7.0","dist":{"integrity":"sha512-gYsAs9JThYWydghtObgL12H/o3cvz1h/tcSTPgKBOhJmtLq+DkdVeUi/JErydcbPNXFkkE4AbK18OP8YBT3W9A==","shasum":"99358334fe14a99b4e05b9ba336d8be68078ee9d","tarball":"https://registry.npmjs.org/@gilbarbara/types/-/types-0.1.0.tgz","fileCount":7,"unpackedSize":5673,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDO9Iq70QdNeZbvhjesvS+SwMY+/Wo9A5GN0+kF+qLPtgIgU7Wg8W7bNJVnpO7xs7RO/FeTaVFW1AXoBRrt37pssuo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYuqBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqADg/+LOZtiXwTxdr9rNsQTXwxcp+f7RTQqrWkgzOMftyImo93cOU6\r\nrw/SwlQZ3VPt7fT/zjQmmFKIjlTyaaRjwqK9GIPb+orOAW1mA4OrOIMhgdnd\r\nQBQCzCujL0slMLSKKPT+bZBQNEb06wmEfIQnGG5gVTSYPT6G10Wpric/TkEx\r\nDf15BrYG053fAah2WRewS9ue3Ade9XkuXrUklFLul7o5VlAXPbWqQS0aDsHY\r\n0gKcHg9Bzs3kCunZS0FR+wNol6t7JqqlZ6hwA258u0/TLz3WbPMy9tqtuQst\r\nRrEyywFFDcsMr2RGT4SN3Wbfy2EtJ/m7V0ycPgHM+aiTio66SFwk/DFAQ5Il\r\n3Q5QEf7L4ByiqgGRCsquwiHFPFR9syvZtmb4DUVnByMfaxcOc8GZ9hcKixXP\r\nRSYonM0lZOKY9C7fr1KrZMoM5fhbhVPqx4JFHY8CsN+/0rq7/tr4ZRT4GMA4\r\nsTmdOjWsQBe91lLBq7HXiWsHKN5O2HRp8Nsn75hCjxgUPvZLkPRnSZl1/xX5\r\nLDCg9f6UTV90p8kHlX6efA274pYBn57fkTIWOybXdNNYJpFan+paq37KYhnq\r\nSgkQ5pXLrbvNOAqR0qnc6BKmdn2o6DnyleM5HzinTsn7aDRUrhClnULkcCp1\r\nLB3s6xl5VoZS+UinBjmC1ekiDaBzSz9tw7o=\r\n=lEQz\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"gilbarbara","email":"gilbarbara@gmail.com"},"directories":{},"maintainers":[{"name":"gilbarbara","email":"gilbarbara@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/types_0.1.0_1650649728824_0.7675634873461006"},"_hasShrinkwrap":false},"0.1.1":{"name":"@gilbarbara/types","version":"0.1.1","description":"Reusable typescript typings","author":{"name":"Gil Barbara","email":"gilbarbara@gmail.com"},"keywords":["typescript","typings"],"repository":{"type":"git","url":"git+https://github.com/gilbarbara/types.git"},"bugs":{"url":"https://github.com/gilbarbara/types/issues"},"homepage":"https://github.com/gilbarbara/types","main":"lib/index.js","types":"./lib","sideEffects":false,"license":"MIT","dependencies":{},"devDependencies":{"@gilbarbara/eslint-config":"^0.2.1","@gilbarbara/prettier-config":"^0.1.0","@gilbarbara/tsconfig":"^0.1.0","del-cli":"^4.0.1","husky":"^7.0.4","jest":"^27.5.1","repo-tools":"^0.2.2","ts-node":"^10.7.0","type-fest":"^2.12.2","typescript":"^4.6.3"},"scripts":{"build":"npm run clear && npm run build:lib","build:lib":"tsc","clear":"del lib/*","lint":"eslint --ext .ts,.tsx src","typecheck":"tsc --noEmit","validate":"npm run lint && npm run typecheck && npm run build","prepare":"husky install","prepublishOnly":"npm run validate"},"eslintConfig":{"extends":["@gilbarbara/eslint-config"]},"prettier":"@gilbarbara/prettier-config","gitHead":"09cb64f8ae24c470f343204cf61b97b4ca6ae893","_id":"@gilbarbara/types@0.1.1","_nodeVersion":"14.19.1","_npmVersion":"6.14.16","dist":{"integrity":"sha512-rvNt+2FzVtS7SyWtF6iz0/IXRLE7vPiY+9bJIDjfKbiFtdFaGbZpX0I9qEMfQfCxX+dEFPG3fTJZ076Y4uh/VA==","shasum":"63c31e56ebced36d6c44b35d442c361c7a6548a0","tarball":"https://registry.npmjs.org/@gilbarbara/types/-/types-0.1.1.tgz","fileCount":23,"unpackedSize":9483,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkyuQXxiOP07/Vn3ViHnpoW0+k8oK67CsNfpKTySpnQwIgLq73NgmHJBxZ7ouX9UP3y6sTA1IxsxmXAhn3JOL0kuw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYv5AACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoSXxAAmBcEpMqScP/CUalym5ZDbfoOe4cLGjZ4feREoCJ+G06sQstD\r\nw7IsWcenvUA3FXCPMwyfdRPVhKeJi1HmT7AlnUjCHfzs+rs+7oOTaibIw2wB\r\nbtCC9HjrL4N/jnjsUn2bicFaOxP1Llz21uTnBFSf8+auboTwwFT0ySksCveF\r\nGLc4uX3AZFCDrBNJkLjH3qUC4B8iZ1YtJeVzQeQmXwez0CZCUnsd+INfRVp1\r\nsZDhqhTlqsyI80GMEPpKeuWfTWitWBGHYQsVFbXp2t3mEY9yJZfKw73zbs77\r\njCgRL8eG942dBai7yzjt103ap3nb1oR4WSb2fFFwwAW1TUmGHZOQJwysOUSV\r\nb0IpNXKHZ/NCbEJXIHbmwCK7nUEX7suRahOUFOy3WsRuY0QDoq0LHimTxvUD\r\n/psaCJiXbCpjnV3O2gpzoTIsyLjwmEoiC05wv5B341AG1/O3ATf5LA48fDm9\r\nz2fGuyRmVpbEdTxeBc0qx7RLcHH/8N1WHaU2cGgrurovMTiyTu8KYoS/VZ7o\r\nOK4Twqd3g6iRd+k8u6osyPx2TTnx39T7rGTT30BU4jV4LpCoxfFhChh8oFZy\r\n1igFDjoYS7hQvAzwbnZ7GKRTkCfhnKiznsEREPr8Kgek9iz7wgqMmXVIfNT/\r\nFtc6nnK61zt0FDYroQU+1peFqWbGIn/VFms=\r\n=QQpl\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"gilbarbara","email":"gilbarbara@gmail.com"},"directories":{},"maintainers":[{"name":"gilbarbara","email":"gilbarbara@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/types_0.1.1_1650654784173_0.4880389105313936"},"_hasShrinkwrap":false},"0.2.0":{"name":"@gilbarbara/types","version":"0.2.0","description":"Reusable typescript typings","author":{"name":"Gil Barbara","email":"gilbarbara@gmail.com"},"keywords":["typescript","typings"],"repository":{"type":"git","url":"git+https://github.com/gilbarbara/types.git"},"bugs":{"url":"https://github.com/gilbarbara/types/issues"},"homepage":"https://github.com/gilbarbara/types","main":"dist/index.js","types":"./dist","sideEffects":false,"license":"MIT","dependencies":{"type-fest":"^4.1.0"},"devDependencies":{"@gilbarbara/eslint-config":"^0.5.1","@gilbarbara/prettier-config":"^1.0.0","@gilbarbara/tsconfig":"^0.1.1","@types/jest":"^29.5.3","@types/node":"^20.4.5","del-cli":"^5.0.0","expect-type":"^0.16.0","husky":"^8.0.3","jest":"^29.6.2","repo-tools":"^0.2.2","ts-jest":"^29.1.1","ts-node":"^10.9.1","typescript":"^5.1.6"},"scripts":{"build":"npm run clear && npm run build:files","build:files":"tsc","clear":"del dist/*","lint":"eslint --ext .ts,.tsx src","test":"jest --bail","test:watch":"jest --watchAll --verbose","typecheck":"tsc --noEmit","validate":"npm run lint && npm run typecheck && npm run test && npm run build","prepare":"husky install","prepublishOnly":"npm run validate"},"eslintConfig":{"extends":["@gilbarbara/eslint-config"],"rules":{"jest/expect-expect":["warn",{"assertFunctionNames":["expect","expectTypeOf"]}]}},"prettier":"@gilbarbara/prettier-config","gitHead":"f7ae2b63df7354b65e9139d200652c73ca53a5fb","_id":"@gilbarbara/types@0.2.0","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-5H3zSs0V8YAxoNB6Arge5lPFxFFBZWcbuLX7nQz9ucMRe9Cak3Er9FuVUPiJwNnHJoHjsrqtghY/ZshM2/3cww==","shasum":"1de5905877ba1a67bad90b902a40a90ddb6285e3","tarball":"https://registry.npmjs.org/@gilbarbara/types/-/types-0.2.0.tgz","fileCount":22,"unpackedSize":13111,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVnrQPcR1f4rAUZBpL0mfXWcuHia1hOOWVM95Fd+1qXQIhAL7C/5GAxtvq575uFgSWkGGTNKohj+jjXG20eT29YB46"}]},"_npmUser":{"name":"gilbarbara","email":"gilbarbara@gmail.com"},"directories":{},"maintainers":[{"name":"gilbarbara","email":"gilbarbara@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/types_0.2.0_1690904672007_0.425781372912597"},"_hasShrinkwrap":false},"0.2.1":{"name":"@gilbarbara/types","version":"0.2.1","description":"Reusable typescript typings","author":{"name":"Gil Barbara","email":"gilbarbara@gmail.com"},"keywords":["typescript","typings"],"repository":{"type":"git","url":"git+https://github.com/gilbarbara/types.git"},"bugs":{"url":"https://github.com/gilbarbara/types/issues"},"homepage":"https://github.com/gilbarbara/types","main":"dist/index.js","types":"./dist","sideEffects":false,"license":"MIT","dependencies":{"type-fest":"^4.1.0"},"devDependencies":{"@gilbarbara/eslint-config":"^0.5.1","@gilbarbara/prettier-config":"^1.0.0","@gilbarbara/tsconfig":"^0.1.1","@types/jest":"^29.5.3","@types/node":"^20.4.5","del-cli":"^5.0.0","expect-type":"^0.16.0","husky":"^8.0.3","jest":"^29.6.2","repo-tools":"^0.2.2","ts-jest":"^29.1.1","ts-node":"^10.9.1","typescript":"^5.1.6"},"scripts":{"build":"npm run clear && npm run build:files","build:files":"tsc","clear":"del dist/*","lint":"eslint --ext .ts,.tsx src","test":"jest --bail","test:watch":"jest --watchAll --verbose","typecheck":"tsc --noEmit","validate":"npm run lint && npm run typecheck && npm run test && npm run build","prepare":"husky install","prepublishOnly":"npm run validate"},"eslintConfig":{"extends":["@gilbarbara/eslint-config"],"rules":{"jest/expect-expect":["warn",{"assertFunctionNames":["expect","expectTypeOf"]}]}},"prettier":"@gilbarbara/prettier-config","gitHead":"5cf9d98d33517f4100fc2d91bf377b4ada18925f","_id":"@gilbarbara/types@0.2.1","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-XGoP6yP8eYETlb0REoXqfN5KiWYGYt4zwdfSWhAuSV29ULMXotmIpGGaiUoLlHAwLV4laqSzaIlOEdMIi91o5Q==","shasum":"e3d748a72fcf5fa4a31d571a655494cf7d3efbf9","tarball":"https://registry.npmjs.org/@gilbarbara/types/-/types-0.2.1.tgz","fileCount":22,"unpackedSize":14329,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXk7lWBXqjcShebO8MSM3f5Kf2Hz4z0sVcfSke4ACUxQIhAK6Yrpo+LhuJoJWCkS+TmeQicXOgZiFOfD7GQpKpaq27"}]},"_npmUser":{"name":"gilbarbara","email":"gilbarbara@gmail.com"},"directories":{},"maintainers":[{"name":"gilbarbara","email":"gilbarbara@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/types_0.2.1_1690940551801_0.48198709361209424"},"_hasShrinkwrap":false},"0.2.2":{"name":"@gilbarbara/types","version":"0.2.2","description":"Reusable typescript typings","author":{"name":"Gil Barbara","email":"gilbarbara@gmail.com"},"keywords":["typescript","typings"],"repository":{"type":"git","url":"git+https://github.com/gilbarbara/types.git"},"bugs":{"url":"https://github.com/gilbarbara/types/issues"},"homepage":"https://github.com/gilbarbara/types","main":"dist/index.js","types":"./dist","sideEffects":false,"license":"MIT","dependencies":{"type-fest":"^4.1.0"},"devDependencies":{"@gilbarbara/eslint-config":"^0.5.1","@gilbarbara/prettier-config":"^1.0.0","@gilbarbara/tsconfig":"^0.1.1","@types/jest":"^29.5.3","@types/node":"^20.4.5","del-cli":"^5.0.0","expect-type":"^0.16.0","husky":"^8.0.3","jest":"^29.6.2","repo-tools":"^0.2.2","ts-jest":"^29.1.1","ts-node":"^10.9.1","typescript":"^5.1.6"},"scripts":{"build":"npm run clear && npm run build:files","build:files":"tsc","clear":"del dist/*","lint":"eslint --ext .ts,.tsx src","test":"jest --bail","test:watch":"jest --watchAll --verbose","typecheck":"tsc --noEmit","validate":"npm run lint && npm run typecheck && npm run test && npm run build","prepare":"husky install","prepublishOnly":"npm run validate"},"eslintConfig":{"extends":["@gilbarbara/eslint-config"],"rules":{"jest/expect-expect":["warn",{"assertFunctionNames":["expect","expectTypeOf"]}]}},"prettier":"@gilbarbara/prettier-config","gitHead":"7f49d9dd98a4bbfd723f13bf58257d5058c7efbb","_id":"@gilbarbara/types@0.2.2","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-QuQDBRRcm1Q8AbSac2W1YElurOhprj3Iko/o+P1fJxUWS4rOGKMVli98OXS7uo4z+cKAif6a+L9bcZFSyauQpQ==","shasum":"397d66e5e4b1c44b65093b61e1e2bc0518b7d498","tarball":"https://registry.npmjs.org/@gilbarbara/types/-/types-0.2.2.tgz","fileCount":22,"unpackedSize":14818,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmBZPPR3g0QwWk8MkOORIu9tzzHENzuxkp3fagD/12fgIgIP5xo918eUwNYXBa9dW6cSi9vF7Gh3EnKvuA4ux5BDw="}]},"_npmUser":{"name":"gilbarbara","email":"gilbarbara@gmail.com"},"directories":{},"maintainers":[{"name":"gilbarbara","email":"gilbarbara@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/types_0.2.2_1691018770254_0.6061611008295824"},"_hasShrinkwrap":false}},"time":{"created":"2022-04-22T17:48:48.725Z","0.1.0":"2022-04-22T17:48:48.984Z","modified":"2023-08-02T23:26:10.512Z","0.1.1":"2022-04-22T19:13:04.359Z","0.2.0":"2023-08-01T15:44:32.157Z","0.2.1":"2023-08-02T01:42:31.957Z","0.2.2":"2023-08-02T23:26:10.400Z"},"maintainers":[{"name":"gilbarbara","email":"gilbarbara@gmail.com"}],"description":"Reusable typescript typings","homepage":"https://github.com/gilbarbara/types","keywords":["typescript","typings"],"repository":{"type":"git","url":"git+https://github.com/gilbarbara/types.git"},"author":{"name":"Gil Barbara","email":"gilbarbara@gmail.com"},"bugs":{"url":"https://github.com/gilbarbara/types/issues"},"license":"MIT","readme":"# @gilbarbara/types\n\n[![npm version](https://badge.fury.io/js/%40gilbarbara%2Ftypes.svg)](https://badge.fury.io/js/%40gilbarbara%2Ftypes) [![CI](https://github.com/gilbarbara/types/actions/workflows/main.yml/badge.svg)](https://github.com/gilbarbara/types/actions/workflows/main.yml)\n\nReusable typescript typings.\n\n## Setup\n\n```sh\nnpm i @gilbarbara/types\n```\n\nFor convenience, the `type-fest` package is re-exported.\n\n## Types\n\n### Aliases\n\n```typescript\ntype NumberOrNull = number | null;\ntype StringOrNull = string | null;\ntype StringOrNumber = string | number;\n\ntype PlainObject<T = unknown> = Record<string, T>;\n\ntype GenericFunction<T = unknown> = (...arguments_: any[]) => T;\ntype VoidFunction = () => void;\n```\n\n\n### Common\n\n```typescript\ntype AsyncStatus = 'IDLE' | 'PENDING' | 'SUCCESS' | 'ERROR';\n\ninterface AsyncFlow {\n  message: string;\n  status: AsyncStatus;\n}\n\ninterface AsyncFlowWithCache extends AsyncFlow {\n  updatedAt: number;\n}\n\ninterface AsyncFlowWithData<T = any> extends AsyncFlow {\n  data: T;\n}\n\ninterface AsyncFlowWithDataAndCache<T = any> extends AsyncFlowWithData<T> {\n  updatedAt: number;\n}\n\ntype HttpMethods =\n  | 'CONNECT'\n  | 'DELETE'\n  | 'GET'\n  | 'HEAD'\n  | 'OPTIONS'\n  | 'PATCH'\n  | 'POST'\n  | 'PUT';\n\ninterface IdName {\n  id: string;\n  name: string;\n}\n\ninterface LabelValue {\n  label: string;\n  value: string;\n}\n```\n\n### Utilities\n\n```typescript\n/**\n * Narrow down a Record to a plain object.\n */\ntype NarrowPlainObject<T extends Record<string, any>> = Exclude<\n  T,\n  Array<unknown> | Function | Map<unknown, unknown> | Set<unknown>\n>;\n```\n\n```typescript\n/**\n * An object without excluded types.\n */\ntype RemoveType<TObject, TExclude = undefined> = {\n  [Key in keyof TObject as TObject[Key] extends TExclude ? never : Key]: TObject[Key];\n};\n```\n\n```typescript\n/**\n * A strict plain object with a specific set of keys.\n */\ntype StrictObject<TObject extends Record<PropertyKey, unknown>, TExpected> = TExpected & {\n  [Key in keyof TObject]: Key extends keyof TExpected ? TExpected[Key] : never;\n};\n```\n\n","readmeFilename":"README.md"}