-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #542 from DataDog/louiszawadzki/fix-webview-new-ar…
…chitecture Fix webview telemetry for new architecture apps
- Loading branch information
1 parent
20f65b5
commit 3ae7e2c
Showing
3 changed files
with
24 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. | ||
* This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
* Copyright 2016-Present Datadog, Inc. | ||
*/ | ||
|
||
import type { TurboModule } from 'react-native'; | ||
import { TurboModuleRegistry } from 'react-native'; | ||
|
||
/** | ||
* We have to redefine the spec for the Native SDK here to be able to use the new architecture. | ||
* We don't declare it in a spec file so we don't end up with a duplicate definition of the native module. | ||
*/ | ||
interface PartialNativeDdSdkSpec extends TurboModule { | ||
consumeWebviewEvent(message: string): Promise<void>; | ||
telemetryError(message: string, stack: string, kind: string): Promise<void>; | ||
} | ||
export const NativeDdSdk = TurboModuleRegistry.get<PartialNativeDdSdkSpec>( | ||
'DdSdk' | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters