Skip to content

Are the generated typescript clients tree shakeable? #4908

Answered by baywet
vkhobor asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, thank you for your interest in kiota and for reaching out.
We spent a lot of time optimizing for a bundle size over the last year. What remains is effectively an object with the important metadata to generate requests and most of the code is actually proxied so you don't pay the cost of all the different methods multiple times. You only pay that cost a single time.
You will also notice that we are emitting interfaces whenever possible to reduce again the amount of code that gets transpiled so the size is optimized as much as possible.
But yes, ultimately this object is not trimmable and this is why selecting only the operations you care about is important to get the smallest size poss…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@vkhobor
Comment options

@baywet
Comment options

@vkhobor
Comment options

@baywet
Comment options

Answer selected by vkhobor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants