Sen API
Sen Libraries
Toggle main menu visibility
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
11
#include "
sen/core/base/compiler_macros.h
"
12
#include "
sen/core/lang/stl_resolver.h
"
13
14
#include <filesystem>
15
#include <map>
16
#include <memory>
17
#include <string>
18
19
namespace
sen::gen
20
{
21
24
class
TypeScriptGenerator
25
{
26
SEN_NOCOPY_NOMOVE(
TypeScriptGenerator
)
27
28
public
:
29
TypeScriptGenerator
();
30
~TypeScriptGenerator
();
31
35
using
FileContents
= std::map<std::filesystem::path, std::string>;
36
39
[[nodiscard]]
FileContents
generate
(
const
sen::lang::TypeSetContext
& typeSets);
40
41
private
:
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
sen::gen::TypeScriptGenerator::TypeScriptGenerator
TypeScriptGenerator()
sen::gen::TypeScriptGenerator::generate
FileContents generate(const sen::lang::TypeSetContext &typeSets)
Renders one .ts file per type set transitively reachable from typeSets, plus the barrel....
sen::gen::TypeScriptGenerator::FileContents
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
sen::gen::TypeScriptGenerator::~TypeScriptGenerator
~TypeScriptGenerator()
sen::lang::TypeSetContext
The set of types used during resolution.
Definition
stl_resolver.h:51
compiler_macros.h
sen::gen
Definition
cpp.h:21
stl_resolver.h
libs
gen
include
sen
gen
typescript.h
Generated by
1.17.0