javascript/typescript

Authoring dynamic JavaScript and its statically typed superset TypeScript: involves ES module patterns, async/await, DOM/Node APIs, plus TypeScript's type annotations, generics and compile-time checking via tsc, and related tooling (tsconfig, linters, bundlers) to improve maintainability at scale.

javascripttypescript

12-Month Skill Trend

Momentum and market value over time
Trending
Score
+20 in 12 mo
96
12 mo agoNow
Career
Value
+$12K in 12 mo
$42K/year
12 mo agoNow

Recommended Survey Paper

Quick overview of the field
View more

Must-Read Papers

Most classic and influential ideas
View more

This study addresses the limited systematic understanding of real-world defects in the TypeScript ecosystem, particularly the lack of empirical evidence on how the type system influences fault distribution. Through a large-scale analysis of 633 defect reports from 16 prominent open-source projects, we develop a fine-grained defect taxonomy and employ statistical methods to examine its relationship with project size, domain, and dependency structure. Our findings reveal that faults in TypeScript projects predominantly stem from toolchain issues, configuration errors, API misuse, and asynchronous error handling—rather than traditional logic or syntax bugs. While static typing significantly suppresses runtime and type-related errors, the locus of failures has shifted toward build systems and integration boundaries, highlighting toolchain complexity and dependency management as key drivers of modern software faults.

empirical studyfault taxonomysoftware bugs

This study investigates whether developers actually use type annotations as inline documentation during code comprehension and debugging. Through an eye-tracking experiment with 26 undergraduate participants performing code summarization and bug localization tasks on TypeScript code, the research examines visual attention to type-annotated lines. As the first empirical study employing eye tracking to assess developers’ engagement with static type information, the findings reveal that participants did not significantly fixate more on code lines containing type annotations, thereby challenging the widely held assumption that type annotations inherently serve as effective documentation. These results carry important implications for the design of programming tools and the pedagogy of type systems.

code comprehensiondeveloper behavioreye-tracking

This work addresses the inefficiency of modern JavaScript compilers, which often waste substantial computational resources by indiscriminately applying all downlevel transformations regardless of the actual language features used. To mitigate this, the authors propose a conditional transpilation mechanism that precisely detects and dynamically tracks the set of language features employed at the script level, triggering transformations only for those features that require them. Implemented within the Google Closure Compiler, the approach integrates feature set construction, strategic pass ordering, and post-transpilation feature validation to significantly reduce unnecessary abstract syntax tree (AST) traversals. Empirical evaluation on large-scale production codebases demonstrates that the proposed method effectively decreases compilation time while reducing both memory consumption and computational overhead.

compilation efficiencyECMAScriptfeature detection

This work addresses the erosion of TypeScript’s static guarantees caused by the pervasive use of the `any` type in function decorators within dynamic languages. We propose the F<:DR calculus, which introduces domain (Dom(T)) and range (Range(T)) projection types to enable precise type checking for arbitrary function calls while preserving compatibility with System F<:. The approach supports lightweight parametric polymorphism, allowing safe expression of higher-order function patterns without resorting to unsafe `any` types. Leveraging logical relations and a path-selection mechanism, we formalize and prove the semantic type safety of F<:DR in Rocq. Moreover, the design naturally extends to other projection scenarios, such as product types.

domain and range typesfunction typesparametric polymorphism

Guard Analysis and Safe Erasure Gradual Typing: a Type System for Elixir

Aug 26, 2024
GC
Giuseppe Castagna
🏛️ CNRS | Université Paris Cité | Remote Technology

To address the lack of high-precision static typing in the dynamically typed functional language Elixir, this paper proposes a progressive semantic subtyping system that requires no modifications to the compiler or runtime. Methodologically, it introduces the first strong static function identification mechanism, integrating fine-grained type inference—based on guard condition modeling and pattern matching—with formalized runtime checks within semantic subtyping theory; type checking is achieved non-intrusively and with zero migration overhead. The key contribution is the first support for high-precision type inference under semantic subtyping constraints within the Elixir ecosystem: it achieves full backward compatibility while significantly improving type coverage and safety. This work establishes a reusable theoretical framework and engineering paradigm for progressive typing in dynamic languages.

Combining gradual typing with semantic subtyping for static analysisEnsuring type soundness through runtime checks and guard analysisFormalizing a type system for dynamically typed Elixir language

Latest Papers

What's happening recently
View more

This work addresses the susceptibility of Erlang programs to runtime errors due to its dynamic typing and the lack of static checking support in existing type annotations. We present the first complete integration of a set-theoretic type system into Erlang, which supports dynamic type tests, subtyping, recursive types, parametric polymorphism, and untagged union types, while preserving both type safety and decidability alongside Erlang’s distinctive language features. We design and implement corresponding type inference and checking algorithms, and validate their effectiveness on the Erlang standard library, third-party projects, and the checker’s own codebase. The evaluation demonstrates the approach’s practicality by successfully identifying latent type errors, confirming its feasibility and utility in real-world scenarios.

dynamic typingErlangruntime errors

This work addresses the performance bottlenecks of existing Language Server Protocol (LSP)-based code parsing approaches in large-scale TypeScript projects, where frequent symbol queries hinder efficient function-level indexing. To overcome this limitation, we propose abcoder-ts-parser, which uniquely integrates the native capabilities of the TypeScript Compiler API directly into the indexing pipeline. By leveraging the compiler’s abstract syntax tree (AST), semantic information, and module resolution logic, our method constructs a graph-structured index—UniAST—that preserves call chains and dependency relationships. Experimental evaluation on three open-source projects, including one with up to 1.2 million lines of code, demonstrates that abcoder-ts-parser substantially outperforms conventional LSP-based architectures, achieving significant improvements in both indexing efficiency and reliability.

code indexinglanguage server protocolperformance bottleneck

This work addresses the significant runtime overhead commonly incurred by assertion checking in dynamically typed languages. It proposes a novel approach that, for the first time, systematically incorporates multi-calling-context information into a goal-directed, multi-variant abstract interpretation framework. By performing top-down inference of program properties under distinct calling contexts and selectively integrating the runtime semantics of assertions, the method substantially reduces redundant checks while preserving the ability to provide hints about unverified properties. An implementation in the Ciao system demonstrates that this technique markedly decreases the number of runtime checks and improves execution performance compared to existing approaches.

abstract interpretationassertion propertiesdynamic languages

This work addresses the scope extrusion problem that arises when gradual typing, metaprogramming, and mutable references interact, potentially allowing free variables to escape their lexical scopes. To resolve this, we present λ^{α,★}_{Ref}, the first gradually typed metaprogramming language supporting mutable references while guaranteeing scope safety. Our approach combines a static type system with dynamic checks to preserve scope integrity. We introduce a novel coercion calculus, CC^{α,★}_{Ref}, built upon an extended Henglein coercion framework, which dynamically enforces environment classifier rules within the gradual type system and supports code types, classifier polymorphism, and subtyping constraints. We formally prove that the language ensures both type safety and scope safety, and we provide a space-efficient mechanism for scope checking that guarantees bounded runtime overhead.

gradual typingmetaprogrammingmutable references

This work addresses the challenge of limited type inference accuracy in dynamically typed languages due to the absence of type annotations. The authors propose a novel approach that integrates large language models with interprocedural program slicing: by extracting cross-function contextual information through slicing, the method constructs structured candidate complex types, effectively compensating for the model’s insufficient domain knowledge and enhancing contextual awareness. This is the first study to synergistically combine interprocedural slicing with large language models for type inference. Evaluated on the ManyTypes4Py and ManyTypes4TypeScript datasets, the approach achieves Top-1 exact match accuracies of 88.9% and 86.6%, respectively, representing improvements of 7.1 and 10.3 percentage points over the current state-of-the-art methods.

contextual informationdynamic languagesinter-procedural slicing

Hot Scholars

SA

Saba Alimadadi

Simon Fraser University (SFU)
Program analysisProgram comprehensionDebuggingWeb engineering
NS

Nick Sumner

Associate Professor, Simon Fraser University
Program AnalysisDebuggingTestingConcurrency
BS

Bonita Sharif

University of Nebraska - Lincoln
software engineeringHCIprogram comprehensioneye tracking
RD

Robert Dyer

Assistant Professor, University of Nebraska-Lincoln
Software EngineeringMining Software RepositoriesProgramming LanguagesBig Data
TR

Tiark Rompf

Purdue University
programming languagescompilersdatabasesmachine learning