Merge pull request #133 from microsoft/tsconfig

Improve custom component consumption
This commit is contained in:
Alexander Sklar 2021-09-30 13:35:36 -07:00 коммит произвёл GitHub
Родитель 65f732fded 1f41a4929a
Коммит 5605c60dd6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 16 добавлений и 8 удалений

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "react-native-xaml",
"title": "React Native Xaml",
"version": "0.0.43",
"version": "0.0.44",
"description": "Allows using XAML directly, inside of a React Native Windows app",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
@ -31,27 +31,31 @@
"license": "MIT",
"licenseFilename": "LICENSE",
"readmeFilename": "README.md",
"dependencies": {
"@types/react": "*",
"@types/react-native": "*"
},
"peerDependencies": {
"react": ">= 17.0.1",
"react-native": ">= 0.64.2",
"react-native-windows": ">= 0.64.5"
"react-native-windows": ">= 0.64.5",
"typescript": "^4.1.2"
},
"devDependencies": {
"@types/jest": "*",
"@types/react": "*",
"@types/react-native": "*",
"@typescript-eslint/eslint-plugin": "^2.27.0",
"@typescript-eslint/parser": "^2.27.0",
"react": "17.0.1",
"react-native": ">=0.64.2",
"react-native-typescript-transformer": "*",
"react-native-windows": ">=0.64.14",
"typescript": "^4.1.2"
"react-native-windows": ">=0.64.14"
},
"files": [
"!*.tgz",
"CodeGen/*.cs*",
"CodeGen/*.json",
"CodeGen/tsconfig.json",
"*.cmd",
"windows/",
"lib/",
"src/",

Просмотреть файл

@ -0,0 +1,3 @@
@echo off
rem run this to rebuild the react-native-xaml projection
dotnet run --project .\Codegen\ %*

Просмотреть файл

@ -202,6 +202,7 @@
<None Include="packages.config" />
<None Include="PropertySheet.props" />
</ItemGroup>
<Import Project="$(SolutionDir)\ReactNativeXaml.Imports.props" Condition="Exists('$(SolutionDir)\ReactNativeXaml.Imports.props')" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ReactNativeWindowsTargets">
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.Uwp.CppLib.targets')" />

Просмотреть файл

@ -18,7 +18,7 @@ const EventArgsProperty* GetProp(const std::string& name, const winrt::Windows::
return nullptr;
}
template <typename TLambda, std::enable_if_t<!std::is_void<std::invoke_result_t<TLambda>>::value, int> = 0>
template <typename TLambda, std::enable_if_t<!std::is_void<std::invoke_result_t<TLambda>>::value, int>>
auto XamlObject::RunOnUIThread(const TLambda& code) const {
std::condition_variable cv;
std::mutex mutex;
@ -52,7 +52,7 @@ auto XamlObject::RunOnUIThread(const TLambda& code) const {
return result.value();
}
template <typename TLambda, std::enable_if_t<std::is_void<std::invoke_result_t<TLambda>>::value, int> = 0>
template <typename TLambda, std::enable_if_t<std::is_void<std::invoke_result_t<TLambda>>::value, int>>
void XamlObject::RunOnUIThread(const TLambda& code) const {
std::condition_variable cv;
std::mutex mutex;