typescript_3.3

TypeScript 3.3

Return to TypeScript Version History, TypeScript, JavaScript


TypeScript 3.3, released in January 2019, introduced a smaller set of new features compared to previous releases, focusing on enhancements that improve the language's usability and developer experience. This version aimed at refining existing capabilities and fixing known issues, demonstrating TypeScript's commitment to stability and performance. Below is a summary of the main features and improvements in TypeScript 3.3, including code examples and comparisons to similar features in other programming languages. Additionally, essential links to TypeScript resources are provided.

- Language Documentation: [TypeScript Documentation](https://www.typescriptlang.org/docs/) - GitHub Repository: [TypeScript GitHub](https://github.com/microsoft/TypeScript) - Official Website: [TypeScript](https://www.typescriptlang.org/) - Wikipedia: [TypeScript Wikipedia](https://en.wikipedia.org/wiki/TypeScript)

  1. Improved Behavior for Calling Union Types

TypeScript 3.3 improved the behavior when calling functions that are part of a union type, making it easier to work with functions that might have different sets of parameters.

```typescript type StringOrNumberFunc = 1); // Correct usage ```

JavaScript's dynamic nature allows `bind`, `call`, and `apply` without static type checks. C# uses delegates and `Expression` trees to achieve similar functionality, with strong typing. Java's method references and functional interfaces offer similar capabilities in a statically typed manner. Python's `functools.partial` function can be used to pre-bind arguments to functions, but without static type checking.

  1. Conclusion

TypeScript 3.3 focused on enhancing developer productivity and improving the language's tooling and compilation strategies. While this release was smaller in scope, the improvements to union type function calls and the build system for composite projects represent TypeScript's ongoing efforts to balance new feature development with optimizations and stability enhancements. Comparing these features with those in languages like C#, Java, and Python highlights TypeScript's unique position in the development ecosystem, providing JavaScript developers with tools typically found in statically typed languages to ensure code reliability and efficiency.


TypeScript Version History: TypeScript, JavaScript. TypeScript 4.7 (2022), TypeScript 4.6 (2022), TypeScript 4.5 (2021), TypeScript 4.4 (2021), TypeScript 4.3 (2021), TypeScript 4.2 (2021), TypeScript 4.1 (2020), TypeScript 4.0 (2020), TypeScript 3.9 (2020), TypeScript 3.8 (2020), TypeScript 3.7 (2019), TypeScript 3.6 (2019), TypeScript 3.5 (2019), TypeScript 3.4 (2019), TypeScript 3.3 (2019), TypeScript 3.2 (2018), TypeScript 3.1 (2018), TypeScript 3.0 (2018), TypeScript 2.9 (2018), TypeScript 2.8 (2018), TypeScript 2.7 (2018), TypeScript 2.6 (2017), TypeScript 2.5 (2017), TypeScript 2.4 (2017), TypeScript 2.3 (2017), TypeScript 2.2 (2017), TypeScript 2.1 (2016), TypeScript 2.0 (2016), TypeScript 1.8 (2016), TypeScript 1.7 (2015), TypeScript 1.6 (2015), TypeScript 1.5 (2015), TypeScript 1.4 (2015), TypeScript 1.3 (2014), TypeScript 1.1 (2013), TypeScript 1.0 (2012). (navbar_typecript_versions - see also navbar_typescript, navbar_javacript_versions

TypeScript: TypeScript Glossary, TypeScript Best Practices, Web Development Best Practices, JavaScript Best Practices, TypeScript Fundamentals, TypeScript Inventor - TypeScript Language Designer: Anders Hejlsberg of Microsoft on October 1, 2012; TypeScript Keywords, TypeScript Built-In Data Types, TypeScript Data Structures - TypeScript Algorithms, TypeScript Syntax, TypeScript on Linux, TypeScript on macOS, TypeScript on Windows, TypeScript on Android, TypeScript on iOS, TypeScript Installation, TypeScript Containerization (TypeScript with Docker, TypeScript with Podman, TypeScript and Kubernetes), TypeScript OOP - TypeScript Design Patterns, Clean TypeScript - TypeScript Style Guide, TypeScript Best Practices - TypeScript BDD, Web Browser, Web Development, HTML-CSS, TypeScript Frameworks (Angular), JavaScript Libraries (React.js with TypeScript, Vue.js with TypeScript, jQuery with TypeScript), TypeScript on the Server (TypeScript with Node.js, TypeScript with Deno, TypeScript with Express.js), TypeScript Compiler (tsc, tsconfig.json), TypeScript Transpiler (Transpile TypeScript into JavaScript), Babel and TypeScript, TypeScript Package Management, NPM and TypeScript, NVM and TypeScript, Yarn Package Manager and TypeScript, TypeScript IDEs (Visual Studio Code, Visual Studio, JetBrains WebStorm), TypeScript Development Tools, TypeScript Linter, TypeScript Debugging (Chrome DevTools, JavaScript Source Maps), TypeScript Testing (TypeScript TDD, Selenium, Jest, Mocha.js, Jasmine, Tape Testing (tap-producing test harness for Node.js and browsers), Supertest, React Testing Library, Enzyme.js React Testing, Angular TestBed), TypeScript DevOps - TypeScript SRE, TypeScript Data Science - TypeScript DataOps, TypeScript Machine Learning, TypeScript Deep Learning, Functional TypeScript, TypeScript Concurrency (WebAssembly - WASM) - TypeScript Async (TypeScript Await, TypeScript Promises, TypeScript Workers - Web Workers, Service Workers, Browser Main Thread), TypeScript Concurrency, TypeScript History, TypeScript Bibliography, Manning TypeScript Series, TypeScript Glossary, TypeScript T, TypeScript Courses, TypeScript Standard Library, TypeScript Libraries, TypeScript Frameworks (Angular), TypeScript Research, JavaScript, TypeScript GitHub, Written in TypeScript, TypeScript Popularity, TypeScript Awesome, TypeScript Versions. (navbar_typescript - see also navbar_javascript, navbar_javascript_libraries, navbar_typescript_libraries, navbar_typescript_versions, navbar_typescript_standard_library, navbar_typescript_libraries, navbar_typescript_reserved_words, navbar_typescript_functional, navbar_typescript_concurrency, navbar_typescript_async, navbar_javascript_standard_library, navbar_react.js, navbar_angular, navbar_vue, navbar_javascript_standard_library, navbar_web_development)


© 1994 - 2024 Cloud Monk Losang Jinpa or Fair Use. Disclaimers

SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.


1)
str: string) ⇒ void) | ((num: number) ⇒ void); function func(fn: StringOrNumberFunc) {
 fn("test"); // Correctly identified as an error in TS 3.3
} ``` In comparison, JavaScript does not have static typing, so similar patterns would not cause compile-time errors. C# and Java have method overloading, which can achieve similar functionality but requires methods to be part of the same class. Python uses duck typing, with runtime checks typically used to handle different parameter types.
  1. Incremental File Watching for Composite Projects
TypeScript 3.3 introduced more efficient file watching for composite projects. This feature optimizes the incremental build process, reducing build times by only recompiling affected files and their dependencies. ```json {
 "compilerOptions": {
   "incremental": true,
   "composite": true
 }
} ``` This feature is specific to TypeScript's build system. C# and Java IDEs have similar features for incremental builds in large projects, typically managed by the IDE or build tools like MSBuild for C# and Gradle or Maven for Java. Python does not have a direct equivalent but tools like `watchdog` can be used for watching file changes in development.
  1. Smarter Type-Checking for the `bind`, `call`, and `apply` Methods
TypeScript 3.3 made type-checking for `bind`, `call`, and `apply` methods on functions stricter, ensuring that arguments for these methods match the original function's parameters more accurately. ```typescript function add(a: number, b: number) {
 return a + b;
} const addOne = add.bind(null, 1); console.log(addOne(2
typescript_3.3.txt · Last modified: 2024/05/01 03:53 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki