co/000755 001751 000177 0000000000 14522265601013143 5ustar00runner000000 000000 1452226560114522265601co/LICENSE000644 001751 000177 0000002165 14522265601014154 0ustar00runner000000 000000 1452226560114522265601 MIT License Copyright (c) Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE co/README.md000644 001751 000177 0000002562 14522265601014424 0ustar00runner000000 000000 1452230417214522265601# Installation > `npm install --save @types/co` # Summary This package contains type definitions for co (https://github.com/tj/co#readme). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/co. ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/co/index.d.ts) ````ts // 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 // Generator => TReturn // Function => ReturnType // others => others type ExtractType = I extends { [Symbol.iterator]: () => Iterator } ? TReturn : I extends (...args: any[]) => any ? ReturnType : I; interface Co { Iterator>(fn: F, ...args: Parameters): Promise< ExtractType> >; default: Co; co: Co; wrap: Iterator>( fn: F, ) => (...args: Parameters) => Promise>>; } declare const co: Co; export = co; ```` ### Additional Details * Last updated: Mon, 06 Nov 2023 22:41:05 GMT * Dependencies: none # Credits These definitions were written by [Doniyor Aliyev](https://github.com/doniyor2109). co/index.d.ts000644 001751 000177 0000001471 14522265601015047 0ustar00runner000000 000000 1452226560114522265601// 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 // Generator => TReturn // Function => ReturnType // others => others type ExtractType = I extends { [Symbol.iterator]: () => Iterator } ? TReturn : I extends (...args: any[]) => any ? ReturnType : I; interface Co { Iterator>(fn: F, ...args: Parameters): Promise< ExtractType> >; default: Co; co: Co; wrap: Iterator>( fn: F, ) => (...args: Parameters) => Promise>>; } declare const co: Co; export = co; co/package.json000644 001751 000177 0000001406 14522265601015427 0ustar00runner000000 000000 1452230417214522265601{ "name": "@types/co", "version": "4.6.6", "description": "TypeScript definitions for co", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/co", "license": "MIT", "contributors": [ { "name": "Doniyor Aliyev", "githubUsername": "doniyor2109", "url": "https://github.com/doniyor2109" } ], "main": "", "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", "directory": "types/co" }, "scripts": {}, "dependencies": {}, "typesPublisherContentHash": "628113abe39d9c33cb6659a5041f67e40ecbdac516365e67ef71b16e24c8cedf", "typeScriptVersion": "4.5" }