microsoft / microsoft/teams.ts
[Bug]: @microsoft/teams.graph-endpoints typings file size causes high memory usage
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 107
- Forks
- 39
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 74
Description
### Bug Description
`@microsoft/teams.graph-endpoints` includes a lot of typings files, including the 25MB dist/types/types.d.ts`. The size and structure of this project causes tsc and tsgo to use significant memory even for very basic projects
### Steps to Reproduce
Have a project with a single file such as:
```ts
import { chats, teams } from "@microsoft/teams.graph-endpoints";
export const req = chats.get({ "chat-id": "example-chat-id" });
export const t = teams;
```
https://github.com/mjbvz/test-ts-teams-project provides a complete an example
### Expected Behavior
Normal TSServer / tsgo memory usage
### Actual Behavior
The import causes an extra 300MB memory usage for tsgo and extra 500MB for tsserver
### SDK Version
2.0.13
### Node.js Version
22.14.0
### Additional Context
Also opening an issue against TypeScript to investigate this but a 25MB d.ts also seems pretty high
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the import in the provided test-ts-teams-project reproduction and inspect the 25MB dist/types/types.d.ts file in @microsoft/teams.graph-endpoints. Run the example with tsc and tsgo to establish the reported memory increase. Done means the package no longer causes the reported excessive memory usage while preserving the typings used by the example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100