Sen API
Sen Libraries
Loading...
Searching...
No Matches
typescript.h
Go to the documentation of this file.
1// === typescript.h ====================================================================================================
2// Sen Infrastructure
3// Released under the Apache License v2.0 (SPDX-License-Identifier Apache-2.0).
4// See the LICENSE.txt file for more information.
5// © Airbus SAS, Airbus Helicopters, and Airbus Defence and Space SAU/GmbH/SAS.
6// =====================================================================================================================
7
8#ifndef SEN_LIBS_GEN_INCLUDE_SEN_GEN_TYPESCRIPT_H
9#define SEN_LIBS_GEN_INCLUDE_SEN_GEN_TYPESCRIPT_H
10
13
14#include <filesystem>
15#include <map>
16#include <memory>
17#include <string>
18
19namespace sen::gen
20{
21
25{
26 SEN_NOCOPY_NOMOVE(TypeScriptGenerator)
27
28public:
31
35 using FileContents = std::map<std::filesystem::path, std::string>;
36
39 [[nodiscard]] FileContents generate(const sen::lang::TypeSetContext& typeSets);
40
41private:
42 class Impl;
43 std::unique_ptr<Impl> pimpl_;
44};
45
46} // namespace sen::gen
47
48#endif // SEN_LIBS_GEN_INCLUDE_SEN_GEN_TYPESCRIPT_H
FileContents generate(const sen::lang::TypeSetContext &typeSets)
Renders one .ts file per type set transitively reachable from typeSets, plus the barrel....
std::map< std::filesystem::path, std::string > FileContents
Map of relative output path -> rendered file contents. Keys are <stem>.ts per type set in the transit...
Definition typescript.h:35
The set of types used during resolution.
Definition stl_resolver.h:51
Definition cpp.h:21