{"name":"@types/ee-first","version":"1.1.4","license":"MIT","_id":"@types/ee-first@1.1.4","maintainers":[{"name":"types","email":"ts-npm-types@microsoft.com"}],"contributors":[{"url":"https://github.com/BendingBender","name":"BendingBender","githubUsername":"BendingBender"}],"homepage":"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ee-first","dist":{"shasum":"f71d080e2ec000163d2204019bf8159e2464c1e0","tarball":"http://registry-npm.ywwl.com/@types/ee-first/download/@types/ee-first-1.1.4.tgz","fileCount":5,"integrity":"sha512-YrqoZ/6rXQoMkm5xb3sbV3iyHMYKzAdromJYJBSaaazj93gKh+BnSyKxurwnOcUkd1JzsohoM76+6NMhjUGAiQ==","signatures":[{"sig":"MEUCIQDKs9JwNumplALp6RJwN8/UD0EhUJx3NbsD29zVXB8VKAIgAStG/LtEyaE9BZGpqhr0tyWIHLwPiJ3FRegSXpZa6BE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5650,"size":2160,"noattachment":false,"key":"/@types/ee-first/-/@types/ee-first-1.1.4.tgz"},"main":"","types":"index.d.ts","scripts":{},"_npmUser":{"name":"types","email":"ts-npm-types@microsoft.com"},"repository":{"url":"https://github.com/DefinitelyTyped/DefinitelyTyped.git","type":"git","directory":"types/ee-first"},"description":"TypeScript definitions for ee-first","directories":{},"_nodeVersion":"24.14.1","dependencies":{"@types/node":"*"},"_hasShrinkwrap":false,"peerDependencies":{},"typeScriptVersion":"5.3","_npmOperationalInternal":{"tmp":"tmp/ee-first_1.1.4_1775175219880_0.09973523297872666","host":"s3://npm-registry-packages-npm-production"},"typesPublisherContentHash":"e1fdd374da9c4196c99deb8882515f665bdde214aad163ae86ab5119ba281290","readme":"# Installation\r\n> `npm install --save @types/ee-first`\r\n\r\n# Summary\r\nThis package contains type definitions for ee-first (https://github.com/jonathanong/ee-first).\r\n\r\n# Details\r\nFiles were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ee-first.\r\n## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ee-first/index.d.ts)\r\n````ts\r\n/// <reference types=\"node\" />\n\nimport { EventEmitter } from \"events\";\n\nexport = first;\n\n/**\n * Get the first event in a set of event emitters and event pairs, then clean up after itself.\n * Invoke `listener` on the first event from the list specified in `eventSpec`.\n *\n * @param eventSpec Array of arrays, with each array in the format `[ee, ...event]`.\n * @param listener Will be called only once, the first time any of the given events are emitted.\n * If `error` is one of the listened events, then if that fires first, the `listener` will be given the `err` argument.\n * `listener`'s arguments:\n * - `err`: the first argument emitted from an error event, if applicable\n * - `ee`: the event emitter that fired\n * - `event`: the string event name that fired\n * - `args`: an array of the arguments that were emitted on the event\n */\ndeclare function first<TEmitter extends EventEmitter>(\n    eventSpec: Array<[TEmitter, ...string[]]>,\n    listener: first.Listener<TEmitter>,\n): first.Thunk<TEmitter>;\n\ndeclare namespace first {\n    type Listener<TEmitter extends EventEmitter> = (\n        err: any,\n        ee: TEmitter,\n        event: string,\n        args: any[],\n    ) => void;\n\n    interface Thunk<TEmitter extends EventEmitter> {\n        (listener: Listener<TEmitter>): void;\n\n        /**\n         * The group of listeners can be cancelled before being invoked and have all the event listeners removed\n         * from the underlying event emitters.\n         */\n        cancel(): void;\n    }\n}\n\r\n````\r\n\r\n### Additional Details\r\n * Last updated: Fri, 03 Apr 2026 00:13:39 GMT\r\n * Dependencies: [@types/node](https://npmjs.com/package/@types/node)\r\n\r\n# Credits\r\nThese definitions were written by [BendingBender](https://github.com/BendingBender).\r\n","publish_time":1775175220030,"_cnpm_publish_time":1775175220030,"dist-tags":{"latest":"1.1.4","ts3.0":"1.1.0","ts3.1":"1.1.0","ts3.2":"1.1.0","ts3.3":"1.1.0","ts3.4":"1.1.0","ts3.5":"1.1.0","ts3.6":"1.1.0","ts3.7":"1.1.0","ts3.8":"1.1.0","ts3.9":"1.1.0","ts4.0":"1.1.0","ts4.1":"1.1.0","ts4.2":"1.1.0","ts4.3":"1.1.0","ts4.4":"1.1.0","ts4.5":"1.1.3","ts4.6":"1.1.3","ts4.7":"1.1.3","ts4.8":"1.1.3","ts4.9":"1.1.3","ts5.0":"1.1.3","ts5.1":"1.1.3","ts5.2":"1.1.3","ts5.3":"1.1.4","ts5.4":"1.1.4","ts5.5":"1.1.4","ts5.6":"1.1.4","ts5.7":"1.1.4","ts5.8":"1.1.4","ts5.9":"1.1.4","ts6.0":"1.1.4","ts7.0":"1.1.4","ts7.1":"1.1.4"}}