{"_id":"@types/co","_rev":"2930861","name":"@types/co","description":"TypeScript definitions for co","dist-tags":{"latest":"4.6.3","ts3.1":"4.6.2","ts3.2":"4.6.2","ts3.3":"4.6.2","ts3.4":"4.6.2","ts3.5":"4.6.2","ts3.6":"4.6.2","ts3.7":"4.6.3","ts3.8":"4.6.3","ts3.9":"4.6.3","ts4.0":"4.6.3","ts4.1":"4.6.3","ts4.2":"4.6.3","ts4.3":"4.6.3","ts4.4":"4.6.3","ts4.5":"4.6.3","ts4.6":"4.6.3","ts4.7":"4.6.3","ts4.8":"4.6.3","ts4.9":"4.6.3","ts5.0":"4.6.3","ts5.1":"4.6.3"},"maintainers":[{"name":"types","email":""}],"time":{"modified":"2023-03-14T06:28:05.000Z","created":"2019-02-16T17:47:48.549Z","4.6.3":"2021-09-27T14:01:49.538Z","4.6.2":"2019-06-04T18:05:30.065Z","4.6.1":"2019-04-26T18:21:15.002Z","4.6.0":"2019-02-16T17:47:48.549Z"},"users":{},"repository":{"type":"git","url":"https://github.com/DefinitelyTyped/DefinitelyTyped.git","directory":"types/co"},"versions":{"4.6.3":{"name":"@types/co","version":"4.6.3","description":"TypeScript definitions for co","homepage":"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/co","license":"MIT","contributors":[{"name":"Doniyor Aliyev","url":"https://github.com/doniyor2109","githubUsername":"doniyor2109"}],"main":"","types":"index.d.ts","repository":{"type":"git","url":"https://github.com/DefinitelyTyped/DefinitelyTyped.git","directory":"types/co"},"scripts":{},"dependencies":{},"typesPublisherContentHash":"75408f3c7b5cbbc89a201a36c37a446e61ffeb8ee403c235cd51f711202ae8bb","typeScriptVersion":"3.7","_id":"@types/co@4.6.3","dist":{"shasum":"a9b9e1976671aa701d1b2743b23de8f0ada61697","size":1883,"noattachment":false,"key":"/@types/co/-/@types/co-4.6.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/@types/co/download/@types/co-4.6.3.tgz"},"_npmUser":{"name":"types","email":"ts-npm-types@microsoft.com"},"directories":{},"maintainers":[{"name":"types","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/co_4.6.3_1632751309396_0.6071098215896313"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-20T07:40:08.826Z","publish_time":1632751309538,"_cnpm_publish_time":1632751309538},"4.6.2":{"name":"@types/co","version":"4.6.2","description":"TypeScript definitions for co","license":"MIT","contributors":[{"name":"Doniyor Aliyev","url":"https://github.com/doniyor2109","githubUsername":"doniyor2109"}],"main":"","types":"index","repository":{"type":"git","url":"https://github.com/DefinitelyTyped/DefinitelyTyped.git","directory":"types/co"},"scripts":{},"dependencies":{},"typesPublisherContentHash":"4e7cb13e9aeef799126e7bb02ece31ba21d26f58ed692bd9490c1cfe1a41e1db","typeScriptVersion":"3.1","_id":"@types/co@4.6.2","dist":{"shasum":"027177ea7a3e34adbd55424e8b949fceb80fda32","size":1693,"noattachment":false,"key":"/@types/co/-/@types/co-4.6.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@types/co/download/@types/co-4.6.2.tgz"},"maintainers":[{"name":"types","email":""}],"_npmUser":{"name":"types","email":"ts-npm-types@microsoft.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/co_4.6.2_1559671529879_0.4106110099578879"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-20T07:40:08.729Z","publish_time":1559671530065,"_cnpm_publish_time":1559671530065},"4.6.1":{"name":"@types/co","version":"4.6.1","description":"TypeScript definitions for co","license":"MIT","contributors":[{"name":"Doniyor Aliyev","url":"https://github.com/doniyor2109","githubUsername":"doniyor2109"}],"main":"","types":"index","repository":{"type":"git","url":"https://github.com/DefinitelyTyped/DefinitelyTyped.git","directory":"types/co"},"scripts":{},"dependencies":{},"typesPublisherContentHash":"be3f9b5f4bb2f89666061d5b8bae758ee18a32da3470cd4ad730d66ca19c425d","typeScriptVersion":"3.1","_id":"@types/co@4.6.1","dist":{"shasum":"37a1bac5735ae52bb61dbb20afbdce6e2068c521","size":1642,"noattachment":false,"key":"/@types/co/-/@types/co-4.6.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@types/co/download/@types/co-4.6.1.tgz"},"maintainers":[{"name":"types","email":""}],"_npmUser":{"name":"types","email":"ts-npm-types@microsoft.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/co_4.6.1_1556302874799_0.763635896137064"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-20T07:40:07.812Z","publish_time":1556302875002,"_cnpm_publish_time":1556302875002},"4.6.0":{"name":"@types/co","version":"4.6.0","description":"TypeScript definitions for co","license":"MIT","contributors":[{"name":"Doniyor Aliyev","url":"https://github.com/doniyor2109","githubUsername":"doniyor2109"}],"main":"","types":"index","repository":{"type":"git","url":"https://github.com/DefinitelyTyped/DefinitelyTyped.git"},"scripts":{},"dependencies":{},"typesPublisherContentHash":"4938e21331d917aa314b6304ba0747fee36c9cdb906bbee01dd6c93009ed9d94","typeScriptVersion":"3.1","_id":"@types/co@4.6.0","dist":{"shasum":"fd7b669f3643e366d2d2114022be0571f3ddfc68","size":1629,"noattachment":false,"key":"/@types/co/-/@types/co-4.6.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@types/co/download/@types/co-4.6.0.tgz"},"maintainers":[{"name":"types","email":""}],"_npmUser":{"name":"types","email":"ts-npm-types@microsoft.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/co_4.6.0_1550339268397_0.016081235517669157"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-20T07:40:06.128Z","publish_time":1550339268549,"_cnpm_publish_time":1550339268549}},"readme":"# Installation\r\n> `npm install --save @types/co`\r\n\r\n# Summary\r\nThis package contains type definitions for co (https://github.com/tj/co#readme).\r\n\r\n# Details\r\nFiles were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/co.\r\n## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/co/index.d.ts)\r\n````ts\r\n// Type definitions for co 4.6\n// Project: https://github.com/tj/co#readme\n// Definitions by: Doniyor Aliyev <https://github.com/doniyor2109>\n// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped\n// Minimum TypeScript Version: 3.6\n\n// Since TS 3.6 the checker knows that the correct type of returned values and yielded values https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-6.html\n// Generator<T, TReturn, TNext> => TReturn\n// Function => ReturnType<Function>\n// others => others\ntype ExtractType<I> = I extends { [Symbol.iterator]: () => Iterator<any, infer TReturn, any> }\n    ? TReturn\n    : I extends (...args: any[]) => any\n    ? ReturnType<I>\n    : I;\n\ninterface Co {\n    <F extends (...args: any[]) => Iterator<any, any, any>>(fn: F, ...args: Parameters<F>): Promise<\n        ExtractType<ReturnType<F>>\n    >;\n    default: Co;\n    co: Co;\n    wrap: <F extends (...args: any[]) => Iterator<any, any, any>>(\n        fn: F,\n    ) => (...args: Parameters<F>) => Promise<ExtractType<ReturnType<F>>>;\n}\n\ndeclare const co: Co;\n\nexport = co;\n\r\n````\r\n\r\n### Additional Details\r\n * Last updated: Mon, 27 Sep 2021 14:01:21 GMT\r\n * Dependencies: none\r\n * Global values: none\r\n\r\n# Credits\r\nThese definitions were written by [Doniyor Aliyev](https://github.com/doniyor2109).\r\n","_attachments":{},"homepage":"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/co","license":"MIT"}