microsoft / microsoft/TypeScript

Make executeCommandLine a public compiler API

Đang mở
#39,283 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

In Discussion Suggestion
Ngôn ngữ chính
Go
Star
111k
Fork
14.3k
Merge trung bình
2 ngày 4 giờ
Pull request đã merge (30 ngày)
132

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách đọc src/executeCommandLine/executeCommandLine.ts và các khai báo công khai trong typescript.d.ts. Xác định các interface và bề mặt của executeCommandLine cần được expose, đồng thời giữ nguyên hành vi của tsc. Hoàn thành nghĩa là hàm và các interface tương ứng có thể được sử dụng thông qua public TypeScript API.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
typescript
Lĩnh vực
compilers
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.