microsoft / microsoft/TypeScript
Make executeCommandLine a public compiler API
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
Search Terms
executeCommandLine, callback, tsc
Suggestion
Make the executeCommandLine function and corresponding interfaces part of the public APIs provided by typescript.d.ts.
Use Cases
We are currently building a customized TypeScript compiler that performs additional security checks to proactively prevent XSS vulnerabilities. We would like the customized compiler to mimic the behavior of tsc as much as possible, but it seems not reasonable to duplicate the code in src/executeCommandLine/executeCommandLine.ts. Making executeCommandLine a public API solves our problem.
We have considered implementing the checks as ESLint passes. But it is not practical for some of our users to deploy ESLint in a short term.
Checklist
My suggestion meets these guidelines:
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
- This feature would agree with the rest of TypeScript's Design Goals.
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 by reading src/executeCommandLine/executeCommandLine.ts and the public declarations in typescript.d.ts. Determine the interfaces and executeCommandLine surface that would need exposure while preserving tsc behavior. Done means the function and corresponding interfaces are available through the public TypeScript API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100