api-client
Skill111k starsChanged 2 years agoApache-2.0View on GitHub
Instructions for working on the API client in ./packages/typescript
3 other projects use a version of this.
Trending
Steady talk.about the whole repository
Most recently taken up by
- fmind/dottheir own version, first seen Oct 5, 2026
- MauricioPerera/llms-txt-skillstheir own version, first seen Aug 29, 2026
- SecuringTheRealm/str-agentic-adventurestheir own version, first seen May 2, 2026
Who's talking about microsoft/TypeScript
- A Hacker News story“Google Feedback on TypeScript 3.5”Hacker News · Sep 9, 2019 · 396 points
- A Hacker News story“PR that converts the TypeScript repo from namespaces to modules”Hacker News · Nov 2, 2022 · 338 points
- palantir/tslint“no-unused-variable rule should not be deprecated”GitHub · Aug 6, 2018 · 312 reactions
- A Hacker News story“TypeScript: Control flow analysis for destructured discriminated unions”Hacker News · Nov 3, 2021 · 299 points
- A Hacker News story“Tips for Performant TypeScript”Hacker News · Nov 24, 2020 · 281 points
The biggest 5 of 104 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 104
Talked about on Bluesky, Hacker News and GitHub (104 times).
On Bluesky · 50
- Sep 5, 2024📦 microsoft / TypeScript ⭐ 100,041 (+32) 🗒 TypeScript TypeScript is a superset of JavaScript that compiles to clean JavaScript output. — @github-trending-js.bsky.social5 likes and reposts
- Feb 13, 2025📦 microsoft / TypeScript ⭐ 102,162 (+31) 🗒 TypeScript TypeScript is a superset of JavaScript that compiles to clean JavaScript output. — @github-trending-js.bsky.social4 likes and reposts
- May 21, 2025📦 microsoft / TypeScript ⭐ 104,560 (+35) 🗒 TypeScript TypeScript is a superset of JavaScript that compiles to clean JavaScript output. — @github-trending-js.bsky.social2 likes and reposts
- May 16, 2025Project: microsoft/TypeScript File: src/compiler/transformers/esDecorators.ts:532 function discardedValueVisitor(node: Node):… — @cfgbot.bsky.social2 likes and reposts
- May 4, 2025Project: microsoft/TypeScript File: src/compiler/checker.ts:27890 function mapType(type: Type, mapper: (t: Type) => Type | undefined,… — @cfgbot.bsky.social2 likes and reposts
45 more on Bluesky
- Oct 11, 2023📦 microsoft / TypeScript ⭐ 94,557 (+36) 🗒 TypeScript TypeScript is a superset of JavaScript that compiles to clean JavaScript output. — @github-trending-js.bsky.social2 likes and reposts
- Oct 11, 2026TypeScript by @OpenAtMicrosoft (⭐️ 111382) TypeScript is a superset of JavaScript that compiles to clean JavaScript output. #go — @golangoss.bsky.social1 likes and repost
- Sep 27, 2026TypeScript by @OpenAtMicrosoft (⭐️ 111229) TypeScript is a superset of JavaScript that compiles to clean JavaScript output. #go — @golangoss.bsky.social1 likes and repost
- Aug 22, 2026今日のGitHubトレンド microsoft/TypeScript TypeScriptは、大規模なJavaScriptアプリケーション開発を目的とした言語です。 JavaScriptにオプションの型を追加することで、あらゆるブラウザ、ホスト、OSでの開発を支援します。… — @dailygithubtrends.bsky.social1 likes and repost
- May 17, 2025Project: microsoft/TypeScript File: src/compiler/checker.ts:20886 function getBestMatchIndexedAccessTypeOrUndefined(source: Type, target:… — @cfgbot.bsky.social1 likes and repost
- May 17, 2025Project: microsoft/TypeScript File: src/compiler/factory/nodeFactory.ts:6124 function cloneSourceFileWorker(source: SourceFile) SVG: dark,… — @cfgbot.bsky.social1 likes and repost
- May 17, 2025Project: microsoft/TypeScript File: src/compiler/checker.ts:38941 function contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node:… — @cfgbot.bsky.social1 likes and repost
- May 16, 2025Project: microsoft/TypeScript File: src/testRunner/unittests/compilerCore.ts:92 () => SVG: dark, light — @cfgbot.bsky.social1 likes and repost
- May 16, 2025Project: microsoft/TypeScript File: src/compiler/transformers/ts.ts:346 function onBeforeVisitNode(node: Node) SVG: dark, light — @cfgbot.bsky.social1 likes and repost
- May 16, 2025Project: microsoft/TypeScript File: src/compiler/binder.ts:3244 function bindModuleExportsAssignment(node:… — @cfgbot.bsky.social1 likes and repost
- May 16, 2025Project: microsoft/TypeScript File: src/compiler/utilities.ts:5387 function isAnonymousFunctionDefinition(node: Expression, cb?: (node:… — @cfgbot.bsky.social1 likes and repost
- May 15, 2025Project: microsoft/TypeScript File: src/compiler/commandLineParser.ts:2437 function convertObjectLiteralExpressionToJson( node:… — @cfgbot.bsky.social1 likes and repost
- May 15, 2025Project: microsoft/TypeScript File: src/server/session.ts:655 (projectResults, project) => SVG: dark, light — @cfgbot.bsky.social1 likes and repost
- May 15, 2025Project: microsoft/TypeScript File: src/compiler/core.ts:242 function countWhere<T>(array: readonly T[] | undefined, predicate: (x: T, i:… — @cfgbot.bsky.social1 likes and repost
- May 14, 2025Project: microsoft/TypeScript File: src/compiler/checker.ts:34447 function isPropertyDeclaredInAncestorClass(prop: Symbol): boolean SVG:… — @cfgbot.bsky.social1 likes and repost
- May 14, 2025Project: microsoft/TypeScript File: src/compiler/factory/utilities.ts:584 function findUseStrictPrologue(statements: readonly Statement[]):… — @cfgbot.bsky.social1 likes and repost
- May 14, 2025Project: microsoft/TypeScript File: src/compiler/checker.ts:33018 function createObjectLiteralType() SVG: dark, light — @cfgbot.bsky.social1 likes and repost
- May 14, 2025Project: microsoft/TypeScript File: src/server/editorServices.ts:3486 function combineProjects(toAddInfo: ScriptInfo) SVG: dark, light — @cfgbot.bsky.social1 likes and repost
- May 14, 2025Project: microsoft/TypeScript File: src/compiler/checker.ts:16727 function getTypeFromTypeReference(node: TypeReferenceType): Type SVG:… — @cfgbot.bsky.social1 likes and repost
- May 13, 2025Project: microsoft/TypeScript File: src/compiler/transformers/generators.ts:1584 function visitForStatement(node: ForStatement) SVG: dark,… — @cfgbot.bsky.social1 likes and repost
- May 13, 2025Project: microsoft/TypeScript File: src/services/services.ts:2797 function getLinkedEditingRangeAtPosition(fileName: string, position:… — @cfgbot.bsky.social1 likes and repost
- May 13, 2025Project: microsoft/TypeScript File: src/compiler/checker.ts:25877 function* getUnmatchedProperties(source: Type, target: Type,… — @cfgbot.bsky.social1 likes and repost
- May 13, 2025Project: microsoft/TypeScript File: src/compiler/program.ts:3932 function pathForLibFileWorker(libFileName: string): LibResolution SVG:… — @cfgbot.bsky.social1 likes and repost
- May 13, 2025Project: microsoft/TypeScript File: src/compiler/checker.ts:50415 function getConstantValue(node: EnumMember | AccessExpression): string |… — @cfgbot.bsky.social1 likes and repost
- May 12, 2025Project: microsoft/TypeScript File: src/compiler/checker.ts:10967 function getRestType(source: Type, properties: PropertyName[], symbol:… — @cfgbot.bsky.social1 likes and repost
- May 12, 2025Project: microsoft/TypeScript File: src/compiler/factory/parenthesizerRules.ts:560 function parenthesizeNonArrayTypeOfPostfixType(type:… — @cfgbot.bsky.social1 likes and repost
- May 12, 2025Project: microsoft/TypeScript File: src/compiler/utilitiesPublic.ts:2040 function isUnaryExpressionKind(kind: SyntaxKind): boolean SVG:… — @cfgbot.bsky.social1 likes and repost
- May 12, 2025Project: microsoft/TypeScript File: src/compiler/program.ts:4690 function createCompilerOptionsDiagnostic(message: DiagnosticMessage |… — @cfgbot.bsky.social1 likes and repost
- May 11, 2025Project: microsoft/TypeScript File: src/harness/harnessUtils.ts:75 function assertInvariantsWorker(node: ts.Node | undefined, parent:… — @cfgbot.bsky.social1 likes and repost
- May 11, 2025Project: microsoft/TypeScript File: src/services/codefixes/fixSpelling.ts:83 function getInfo(sourceFile: SourceFile, pos: number, context:… — @cfgbot.bsky.social1 likes and repost
- May 11, 2025Project: microsoft/TypeScript File: src/harness/fourslashImpl.ts:3815 function getLinkedEditingBaselineWorker(activeFile: FourSlashFile,… — @cfgbot.bsky.social1 likes and repost
- May 10, 2025Project: microsoft/TypeScript File: src/services/codefixes/wrapJsxInFragment.ts:64 function flattenInvalidBinaryExpr(node: Node):… — @cfgbot.bsky.social1 likes and repost
- May 10, 2025Project: microsoft/TypeScript File: src/compiler/transformers/classFields.ts:833 function visitMethodOrAccessorDeclaration(node:… — @cfgbot.bsky.social1 likes and repost
- May 10, 2025Project: microsoft/TypeScript File: src/compiler/checker.ts:15467 function getMinTypeArgumentCount(typeParameters: readonly TypeParameter[]… — @cfgbot.bsky.social1 likes and repost
- May 10, 2025Project: microsoft/TypeScript File: src/services/codefixes/inferFromUsage.ts:650 (parameter, parameterIndex): ParameterInference => SVG:… — @cfgbot.bsky.social1 likes and repost
- May 9, 2025Project: microsoft/TypeScript File: src/harness/harnessIO.ts:555 function* iterateErrorBaseline(inputFiles: readonly TestFile[],… — @cfgbot.bsky.social1 likes and repost
- May 9, 2025Project: microsoft/TypeScript File: src/testRunner/projectsRunner.ts:454 function createCompilerOptions(testCase: ProjectRunnerTestCase &… — @cfgbot.bsky.social1 likes and repost
- May 9, 2025Project: microsoft/TypeScript File: src/compiler/transformers/module/system.ts:1132 function appendExportsOfHoistedDeclaration(statements:… — @cfgbot.bsky.social1 likes and repost
- May 9, 2025Project: microsoft/TypeScript File: src/compiler/transformers/esDecorators.ts:513 function classElementVisitor(node: Node) SVG: dark, light — @cfgbot.bsky.social1 likes and repost
- May 9, 2025Project: microsoft/TypeScript File: src/server/editorServices.ts:3538 fileOrDirectory => SVG: dark, light — @cfgbot.bsky.social1 likes and repost
- May 8, 2025Project: microsoft/TypeScript File: src/compiler/checker.ts:47843 function checkAliasSymbol(node: AliasDeclarationNode) SVG: dark, light — @cfgbot.bsky.social1 likes and repost
- May 8, 2025Project: microsoft/TypeScript File: src/compiler/checker.ts:2637 function cloneSymbol(symbol: Symbol): TransientSymbol SVG: dark, light — @cfgbot.bsky.social1 likes and repost
- May 7, 2025Project: microsoft/TypeScript File: src/compiler/checker.ts:40280 function checkAssignmentDeclaration(kind: AssignmentDeclarationKind,… — @cfgbot.bsky.social1 likes and repost
- May 7, 2025Project: microsoft/TypeScript File: src/services/refactors/moveToFile.ts:619 function getNamesToExportInCommonJS(decl:… — @cfgbot.bsky.social1 likes and repost
- May 6, 2025Project: microsoft/TypeScript File: src/harness/harnessIO.ts:477 function addDtsFile(file: TestFile, dtsFiles: TestFile[]) SVG: dark, light — @cfgbot.bsky.social1 likes and repost
On Hacker News · 43
- Sep 9, 2019Google Feedback on TypeScript 3.5396 points · 145 comments
- Nov 2, 2022PR that converts the TypeScript repo from namespaces to modules338 points · 196 comments
- Nov 3, 2021TypeScript: Control flow analysis for destructured discriminated unions299 points · 107 comments
- Nov 24, 2020Tips for Performant TypeScript281 points · 113 comments
- Aug 1, 2017TypeScripts Type System Is Turing Complete221 points · 88 comments
38 more on Hacker News
- Jul 30, 2016Love for TypeScript220 points · 162 comments
- Mar 21, 2016Non-nullable types for TypeScript185 points · 32 comments
- Jan 7, 2019TypeScript Roadmap 201958 points · 17 comments
- Jul 14, 2021TypeScript's Type System Is Turing Complete (2017)49 points · 43 comments
- Sep 21, 2018TypeScript support for ES Next pipeline operator42 points · 32 comments
- Sep 1, 2020TypeScript: Template string types and mapped type 'as' clauses31 points · 15 comments
- Mar 20, 2023TypeScript cannot emit valid ES modules due to file extension issue (2020)29 points · 14 comments
- Feb 23, 2015Comparison Between TypeScript and Facebook Flow28 points · 4 comments
- Aug 25, 2023TypeScript team's reasoning for rejecting typed/checked exceptions19 points · 1 comment
- Mar 1, 2019TypeScript: Vote for Experimental Support of Optional Chaining15 points · 13 comments
- Jul 12, 2024Alternative File-Type extension for TypeScript files (.ts = MPEG-2 video)13 points · 1 comment
- Aug 31, 2020TypeScript adds support for Template String types13 points
- Sep 6, 2019Google Feedback on TypeScript 3.512 points · 2 comments
- Sep 2, 2023TypeScript Meta Type System – A Proposal11 points · 3 comments
- Jun 25, 2015Proposal for Abstract Classes and Methods in TypeScript10 points
- Apr 1, 2021Add Oracle Types for TypeScript6 points
- Mar 19, 2016Non-nullable types – Microsoft/TypeScript6 points
- Aug 21, 2026Migrate Repo to TypeScript 75 points
- Dec 20, 2023Call it "sloppy mode" – Microsoft/TypeScript (2019)5 points
- Sep 1, 2022bug: TypeScript is not an ECMAScript superset post-ES20155 points · 2 comments
- Jun 29, 2015TypeScript JSX support landed in master branch5 points
- May 19, 2015TypeScript's proposal for JSX/React support (.tsx extension)4 points
- Aug 25, 2025TypeScript: Enable Strict Mode by Default3 points
- Nov 19, 2024TypeScript doesn't follow semver due to marketing reasons3 points · 2 comments
- Jul 3, 2023TypeScripts Type System Is Turing Complete3 points
- Apr 11, 2022TypeScript Instantiation Expressions3 points · 1 comment
- Nov 3, 2021TypeScript: Simplify relationship check for conditional type on target side3 points
- Jul 27, 2019TypeScript 3.7.0 will feature optional chaining (i.e. x?.y)3 points
- Jun 20, 2018VS Code: Refactor Promise Handlers to Async and Await3 points
- Feb 23, 2016What's new in Typescript 1.83 points
- Jul 2, 2015Abstract class and method is now part of TypeScript3 points
- Sep 11, 2025Enable --strict by default2 points
- Apr 1, 2024Proposal: Types as Configuration2 points
- Aug 9, 2023Why TypeScript Doesnt Have Typed nor Checked Exceptions2 points · 1 comment
- Mar 20, 2023TypeScript: Using var in limited contexts to avoid runtime TDZ checks2 points
- Jan 30, 2022TypeScript Bytecode Interpreter / Runtime Types2 points
- Mar 3, 2020TypeScript: Using the Compiler API2 points · 1 comment
- May 22, 2015TypeScript2 points · 1 comment
On GitHub · 11
- Aug 6, 2018no-unused-variable rule should not be deprecated — palantir/tslint312 reactions · 28 comments
- May 28, 2021898 - Includes — type-challenges/type-challenges187 reactions · 64 comments
- Jul 15, 2024Roadmap for experimental TypeScript support — nodejs/loaders178 reactions · 50 comments
- Oct 28, 2025Add Yarn PnP support — microsoft/typescript-go158 reactions · 18 comments
- Oct 17, 2026Compile TypeScript to machine code ahead of time: `bun build --compile --aot` — oven-sh/bun145 reactions · 42 comments
6 more on GitHub
- Jul 23, 2026Content mappers — microsoft/typescript-go122 reactions · 44 comments
- Mar 25, 2018Add TypeScript type checking — webpack/webpack97 reactions · 24 comments
- Nov 27, 2023[WIP] V4 — zloirock/core-js77 reactions · 11 comments
- Jan 12, 2017Rewrite atom-typescript to use tsserver API — TypeStrong/atom-typescript72 reactions · 23 comments
- Aug 17, 2017Further improve Vue type declarations for canonical usage — vuejs/vue69 reactions · 17 comments
- Nov 25, 2022feat(remix-server-runtime): add "jump to definition" support to `useActionData`/`useLoaderData`/`SerializeFrom` — remix-run/remix40 reactions · 15 comments
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- fmind/dot★ 10same name
- SecuringTheRealm/str-agentic-adventures★ 4same name
- MauricioPerera/llms-txt-skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- compiler-and-fourslash-testsSkill
- mcflySkill
- security-report-checkSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 1 is distinctive, and 5 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
When adding a property or method to Type or Symbol that references another Type or Symbol, decide how to represent it via this process:
- Very specific: line 15
Add the method on Type
- Very specific: line 16
Do not cache results on the Type.
- Very specific: line 20
Do not precompute a result to include in TypeResponse
- Very specific: line 21
Do include a backing cache field on Type, initialized to false, and update it after the first call.
- Distinctive: line 28
If the situation doesn't seem to fit any of these categories, STOP and ask the user for guidance, and suggest updating these instructions.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code comments
The user may tell you to reference Strada (the old TypeScript codebase) for implementation, but your code comments should not acknowledge that this codebase is a port of anything else. Comments should stand on their own and describe the code in the current codebase. Never say "Mirrors TypeScript's 'foo' function" or "...like the classic API's 'Bar' type."
Adding properties/methods to Type and Symbol
When adding a property or method to Type or Symbol that references another Type or Symbol, decide how to represent it via this process:
- Does the public method take arguments, like
type.getProperty(name)?- Add the method on
Type - Do not cache results on the
Type. - Result: every call will perform a fetch.
- Add the method on
- Otherwise, does the method take non-trivial work to compute its result, like
type.getReducedType(), or might it return a huge number of results, likeunionType.types()?- Add the method on
Type - Do not precompute a result to include in
TypeResponse - Do include a backing cache field on
Type, initialized tofalse, and update it after the first call. - Result: the first call will always perform a fetch. Subsequent calls will use the cached result.
- Add the method on
- Otherwise, is the method trivial to compute, or represented as a plain property in the Go source?
- Add the method on
Type - Precompute the reference and include the ID in
TypeResponse - Result: the first call will not perform a fetch if a Type/Symbol by that identity is already in the object registry.
- Add the method on
If the situation doesn't seem to fit any of these categories, STOP and ask the user for guidance, and suggest updating these instructions.
Adding methods to Checker
If the method is an operation on a single Type or Symbol that takes no other arguments and returns a Type or Symbol, add the method on Type according to the earlier instructions, and implement the Checker method by delegating to the corresponding Type or Symbol method, so the result is cacheable.
Unnecessary spread and exactOptionalPropertyTypes
Never write code like ...(options ? { snapshot: options.snapshot } : {}). All optional properties should tolerate undefined. If --exactOptionalPropertyTypes is forcing you to write code this way, fix the offending type. Rewriting as if (options) foo.snapshot = options.snapshot is not an acceptable workaround; always fix the type. As a rule, object types used in input positions should always define optional properties with prop?: T | undefined so this isn't a problem.
What kinds of ID collisions matter?
Most API objects synchronize their client and server identities by some kind of handle or ID. Some care has to be taken when choosing an ID scheme.
What matters:
- A single
api.Sessionin LSP mode can have multiple simultaneous clients. Sometimes those clients will all talk about the same server object. Other times, a single client needs to create objects that are private to it, like resolution contexts or source file leases. In those cases, the server must generate the unique ID after creation to avoid ID collision of private objects between multiple clients.
What doesn't matter:
uint64overflow- Passing objects between multiple
APIinstances in the same JS process. We may eventually add some kind of central provenance validation. Do not add it on individual methods or flag it in reviews for now. It's not a realistic concern.
Reference equality guarantees are forfeited by disposing owners and clearing the source file cache
It's not a bug to observe a new object identity for an object whose owner was previously disposed or manually removed by api.clearSourceFileCache(). Review comments and tests that assert an ownership or lifetime bug that rely on testing reference equality after disposal or cache clearing will be rejected.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

