{"id":17005412,"url":"https://github.com/andreialecu/typescript-performance-extends","last_synced_at":"2026-05-14T12:32:18.569Z","repository":{"id":140402747,"uuid":"391069413","full_name":"andreialecu/typescript-performance-extends","owner":"andreialecu","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-02T17:59:44.000Z","size":69,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-11T01:05:54.141Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreialecu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-30T13:11:31.000Z","updated_at":"2021-08-02T11:35:31.000Z","dependencies_parsed_at":"2023-07-04T08:09:43.080Z","dependency_job_id":null,"html_url":"https://github.com/andreialecu/typescript-performance-extends","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andreialecu/typescript-performance-extends","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreialecu%2Ftypescript-performance-extends","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreialecu%2Ftypescript-performance-extends/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreialecu%2Ftypescript-performance-extends/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreialecu%2Ftypescript-performance-extends/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreialecu","download_url":"https://codeload.github.com/andreialecu/typescript-performance-extends/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreialecu%2Ftypescript-performance-extends/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33024942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T04:46:19.582Z","updated_at":"2026-05-14T12:32:18.553Z","avatar_url":"https://github.com/andreialecu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Run `yarn tsc --extendedDiagnostics`:\n\n```\nFiles:                          7\nLines of Library:           24662\nLines of Definitions:        3022\nLines of TypeScript:           18\nLines of JavaScript:            0\nLines of JSON:                  0\nLines of Other:                 0\nNodes of Library:          110877\nNodes of Definitions:       14740\nNodes of TypeScript:           63\nNodes of JavaScript:            0\nNodes of JSON:                  0\nNodes of Other:                 0\nIdentifiers:                45586\nSymbols:                    76446\nTypes:                      20569\nInstantiations:             93884\nMemory used:               93011K\nAssignability cache size:    5146\nIdentity cache size:            0\nSubtype cache size:             0\nStrict subtype cache size:      0\nI/O Read time:              0.00s\nParse time:                 0.23s\nResolveModule time:         0.00s\nProgram time:               0.24s\nBind time:                  0.11s\nCheck time:                 0.67s\ntransformTime time:         0.00s\ncommentTime time:           0.00s\nI/O Write time:             0.00s\nprintTime time:             0.01s\nEmit time:                  0.01s\nTotal time:                 1.04s\n✨  Done in 1.28s.\n```\n\nNotice check time and number of instantiations.\n\n\n\nApply this diff:\n\n```diff\ndiff --git a/types/mongoose.d.ts b/types/mongoose.d.ts\nindex 9e0ad99..2fab5ff 100644\n--- a/types/mongoose.d.ts\n+++ b/types/mongoose.d.ts\n@@ -1232,7 +1232,7 @@ declare module 'mongoose' {\n   type PostMiddlewareFunction\u003cThisType, ResType = any\u003e = (this: ThisType, res: ResType, next: (err?: CallbackError) =\u003e void) =\u003e void | Promise\u003cvoid\u003e;\n   type ErrorHandlingMiddlewareFunction\u003cThisType, ResType = any\u003e = (this: ThisType, err: NativeError, res: ResType, next: (err?: CallbackError) =\u003e void) =\u003e void;\n \n-  class Schema\u003cDocType = Document, M extends Model\u003cDocType, any, any\u003e = Model\u003cany, any, any\u003e, SchemaDefinitionType = undefined, TInstanceMethods = ExtractMethods\u003cM\u003e\u003e extends events.EventEmitter {\n+  class Schema\u003cDocType = Document, M = Model\u003cany, any, any\u003e, SchemaDefinitionType = undefined, TInstanceMethods = any\u003e extends events.EventEmitter {\n     /**\n      * Create a new schema\n      */\n```\n\nResults:\n\n```\nFiles:                          7\nLines of Library:           24662\nLines of Definitions:        3022\nLines of TypeScript:           18\nLines of JavaScript:            0\nLines of JSON:                  0\nLines of Other:                 0\nNodes of Library:          110877\nNodes of Definitions:       14731\nNodes of TypeScript:           63\nNodes of JavaScript:            0\nNodes of JSON:                  0\nNodes of Other:                 0\nIdentifiers:                45582\nSymbols:                    27736\nTypes:                        710\nInstantiations:               818\nMemory used:               59482K\nAssignability cache size:     157\nIdentity cache size:            0\nSubtype cache size:             0\nStrict subtype cache size:      0\nI/O Read time:              0.00s\nParse time:                 0.21s\nResolveModule time:         0.00s\nProgram time:               0.22s\nBind time:                  0.11s\nCheck time:                 0.03s\ntransformTime time:         0.00s\ncommentTime time:           0.00s\nI/O Write time:             0.00s\nprintTime time:             0.01s\nEmit time:                  0.01s\nTotal time:                 0.37s\n✨  Done in 0.72s.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreialecu%2Ftypescript-performance-extends","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreialecu%2Ftypescript-performance-extends","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreialecu%2Ftypescript-performance-extends/lists"}