Type providers pro TypeScript
Název práce v češtině: | Type providers for TypeScript |
---|---|
Název v anglickém jazyce: | Type providers pro TypeScript |
Klíčová slova: | type providers|TypeScript|data access|code generation |
Klíčová slova anglicky: | type providers|TypeScript|data access|code generation |
Akademický rok vypsání: | 2023/2024 |
Typ práce: | diplomová práce |
Jazyk práce: | angličtina |
Ústav: | Katedra distribuovaných a spolehlivých systémů (32-KDSS) |
Vedoucí / školitel: | Mgr. Tomáš Petříček, Ph.D. |
Řešitel: | skrytý![]() |
Datum přihlášení: | 11.07.2024 |
Datum zadání: | 11.07.2024 |
Datum potvrzení stud. oddělením: | 11.07.2024 |
Datum a čas obhajoby: | 11.09.2024 09:00 |
Datum odevzdání elektronické podoby: | 18.07.2024 |
Datum odevzdání tištěné podoby: | 18.07.2024 |
Datum proběhlé obhajoby: | 11.09.2024 |
Oponenti: | RNDr. David Bednárek, Ph.D. |
Zásady pro vypracování |
Type providers [4] simplify data access in statically typed programming languages by integrating external data sources into the type system of the language. Type providers have been implemented for F# [4, 6] and Idris [5] and have been used, for example, to provide typed interface for data in structured formats such as JSON, XML and CSV [1].
The goal of this thesis is to design and implement type provider support for the TypeScript language [7]. The thesis will extend the TypeScript compiler [2, 3] by introducing a mechanism for automatic generation of static types and parser code based on the inference from user-provided data samples. It will adapt the concept of type providers to match the TypeScript's design goals and constraints, which focus on adding best-effort static type-checking to JavaScript. The thesis will contribute a detailed problem analysis and practical prototype implementation. The type provider mechanism will be implemented in a manner that allows supporting additional data formats without the need to further modify the compiler itself, i.e. in the form of standard NPM packages that users can add to their projects or implement themselves. The implementation will consist of modifications to the TypeScript compiler and language service necessary for incorporating the type provider mechanism, and a support library for developing type provider packages. Additionally, several showcase packages for common data formats (CSV, XML, JSON) will be implemented and presented in the thesis to provide a qualitative evaluation of the solution. |
Seznam odborné literatury |
[1] Petricek, T., Guerra, G., & Syme, D. (2016). Types from data: Making structured data first-class citizens in F#. PLDI ’16.
[2] Therox, O. and contributors (2024). TypeScript Compiler Notes. Online. https://github.com/microsoft/TypeScript-Compiler-Notes [3] Syed, B. A. and contributors (2024). TypeScript Deep Dive - TypeScript Compiler Internals. Online. https://basarat.gitbook.io/typescript/overview [4] Syme, D., Battocchi, K., Takeda, K., Malayeri, D., & Petricek, T. (2013, January). Themes in information-rich functional programming for internet-scale data sources. In Proceedings of the 2013 workshop on Data driven functional programming (pp. 1-4). [5] Christiansen, D. R. (2013, September). Dependent type providers. In Proceedings of the 9th ACM SIGPLAN Workshop on Generic Programming (pp. 25-34). [6] Syme, D., Battocchi, K., Takeda, K., Malayeri, D., Fisher, J., Hu, J., ... & Petricek, T. (2012). Strongly-typed language support for internet-scale information sources. Technical Report MSR-TR-2012–101, Microsoft Research. [7] Microsoft and contributors (2024). TypeScript: JavaScript with syntax for types. Online. https://www.typescriptlang.org/ |