Страница:
TypeScript Design Goals
Страницы
'this' in TypeScript
API Breaking Changes
All The Bots
Architectural Overview
Blog Post Ideas
Breaking Changes
Cancellation Support in tsserver
Coding guidelines
Common Errors
Compiler Internals
Compiler Options
Configuring MSBuild projects to use NuGet
Contributing to TypeScript
Debugging Language Service in VS Code
Docker Quickstart
FAQ
FAQs for API Consumers
Getting logs from TS Server in VS Code
Home
How the User Tests Work
How to maintain Definitely Typed tests
Integrating with Build Tools
JSDoc support in JavaScript
JSX
JavaScript Language Service in Visual Studio
Nightly drops
No New Utility Types
Node Target Mapping
Performance Tracing
Performance
Preferred Issue Titles
Providing Visual Studio Repro Steps
README
Release Activities
Resources
Roadmap
SECURITY
Setting Compiler Options in MSBuild projects
Spec conformance testing
Standalone Server (tsserver)
Tooling On The Compiler Repo
Triage Instructions
Triggering TypeScript Bot
Type Checking JavaScript Files
TypeScript's Release Process
TypeScript Deployment
TypeScript Design Goals
TypeScript Editor Support
TypeScript MSBuild In Depth
Typings for npm packages
Updating TypeScript in Visual Studio 2017
Useful Links for TypeScript Issue Management
Using TypeScript With ASP.NET 5
Using the Compiler API (TypeScript 1.4)
Using the Compiler API
Using the Language Service API
Using the New Language Service in Visual Studio 15 Preview
What's new in TypeScript
Writing Good Design Proposals
Writing a Language Service Plugin
tsconfig.json
5
TypeScript Design Goals
Orta редактировал(а) эту страницу 2020-02-26 18:54:38 -05:00
Содержание
Introduction
This document serves to outline the general design principles we have based the TypeScript language on. While it is by no means exhaustive, it aims to summarize the rules by which we've made many of the decisions that have shaped the language. Some of these rules are subjective, and at times are at odds with each other; reaching the right balance and making the right exceptions is the essence of how successful programming languages are designed.
Goals
- Statically identify constructs that are likely to be errors.
- Provide a structuring mechanism for larger pieces of code.
- Impose no runtime overhead on emitted programs.
- Emit clean, idiomatic, recognizable JavaScript code.
- Produce a language that is composable and easy to reason about.
- Align with current and future ECMAScript proposals.
- Preserve runtime behavior of all JavaScript code.
- Avoid adding expression-level syntax.
- Use a consistent, fully erasable, structural type system.
- Be a cross-platform development tool.
- Do not cause substantial breaking changes from TypeScript 1.0.
Non-goals
- Exactly mimic the design of existing languages. Instead, use the behavior of JavaScript and the intentions of program authors as a guide for what makes the most sense in the language.
- Aggressively optimize the runtime performance of programs. Instead, emit idiomatic JavaScript code that plays well with the performance characteristics of runtime platforms.
- Apply a sound or "provably correct" type system. Instead, strike a balance between correctness and productivity.
- Provide an end-to-end build pipeline. Instead, make the system extensible so that external tools can use the compiler for more complex build workflows.
- Add or rely on run-time type information in programs, or emit different code based on the results of the type system. Instead, encourage programming patterns that do not require run-time metadata.
- Provide additional runtime functionality or libraries. Instead, use TypeScript to describe existing libraries.
- Introduce behaviour that is likely to surprise users. Instead have due consideration for patterns adopted by other commonly-used languages.
User documentation
News
Debugging TypeScript
- Performance
- Performance-Tracing
- Debugging-Language-Service-in-VS-Code
- Getting-logs-from-TS-Server-in-VS-Code
- JavaScript-Language-Service-in-Visual-Studio
- Providing-Visual-Studio-Repro-Steps
Contributing to TypeScript
- Contributing to TypeScript
- TypeScript Design Goals
- Coding Guidelines
- Useful Links for TypeScript Issue Management
- Writing Good Design Proposals
- Compiler Repo Notes
- Deployment
Building Tools for TypeScript
- Architectural Overview
- Using the Compiler API
- Using the Language Service API
- Standalone Server (tsserver)
- TypeScript MSBuild In Depth
- Debugging Language Service in VS Code
- Writing a Language Service Plugin
- Docker Quickstart
FAQs
The Main Repo