File tree Expand file tree Collapse file tree
src/generator/include/sourcemeta/codegen Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ * text =auto
2+ * .cc text eol =lf
3+ * .h text eol =lf
4+ * .json text eol =lf
5+ * .ts text eol =lf
16/vendor /** linguist-generated =true
Original file line number Diff line number Diff line change @@ -26,9 +26,18 @@ class SOURCEMETA_CODEGEN_GENERATOR_EXPORT TypeScript {
2626 auto operator ()(const IRUnion &entry) const -> void;
2727
2828private:
29+ // Exporting symbols that depends on the standard C++ library is considered
30+ // safe.
31+ // https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-2-c4275?view=msvc-170&redirectedfrom=MSDN
32+ #if defined(_MSC_VER)
33+ #pragma warning(disable : 4251)
34+ #endif
2935 // NOLINTNEXTLINE(cppcoreguidelines-avoid-const-or-ref-data-members)
3036 std::ostream &output;
3137 std::string_view prefix;
38+ #if defined(_MSC_VER)
39+ #pragma warning(default : 4251)
40+ #endif
3241};
3342
3443} // namespace sourcemeta::codegen
Original file line number Diff line number Diff line change @@ -9,6 +9,12 @@ target_link_libraries(sourcemeta_codegen_e2e_typescript_unit
99target_compile_definitions (sourcemeta_codegen_e2e_typescript_unit
1010 PRIVATE E2E_TYPESCRIPT_PATH= "${CMAKE_CURRENT_SOURCE_DIR} " )
1111
12+ if (WIN32 )
13+ set (TSC_BIN "${PROJECT_SOURCE_DIR} /node_modules/.bin/tsc.cmd" )
14+ else ()
15+ set (TSC_BIN "${PROJECT_SOURCE_DIR} /node_modules/.bin/tsc" )
16+ endif ()
17+
1218set (E2E_SCHEMAS "" )
1319file (GLOB TYPESCRIPT_DIALECT_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR} /*" )
1420foreach (DIALECT_DIRECTORY ${TYPESCRIPT_DIALECT_DIRECTORIES} )
@@ -20,8 +26,7 @@ foreach(DIALECT_DIRECTORY ${TYPESCRIPT_DIALECT_DIRECTORIES})
2026 get_filename_component (CASE_NAME ${CASE_DIRECTORY} NAME )
2127 list (APPEND E2E_SCHEMAS "${CASE_DIRECTORY} /schema.json" )
2228 add_test (NAME "e2e.typescript.tsc.${DIALECT_NAME} .${CASE_NAME} /expected.d.ts"
23- COMMAND "${PROJECT_SOURCE_DIR} /node_modules/.bin/tsc" --noEmit
24- "${CASE_DIRECTORY} /expected.d.ts" )
29+ COMMAND "${TSC_BIN} " --noEmit "${CASE_DIRECTORY} /expected.d.ts" )
2530 endif ()
2631 endforeach ()
2732 endif ()
You can’t perform that action at this time.
0 commit comments