Skip to content

Commit

Permalink
Convert EmptyReactNativeConfig to Kotlin (#42286)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #42286

Convert EmptyReactNativeConfig to Kotlin

Changelog:
[Internal] [Changed] - Convert EmptyReactNativeConfig to Kotlin

Reviewed By: huntie

Differential Revision: D52698594

fbshipit-source-id: c4963ff4edc5054d1b78d1c1858e22eb4ef9279e
  • Loading branch information
cortinico authored and facebook-github-bot committed Jan 15, 2024
1 parent cfef30f commit 0c7008f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 40 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
package com.facebook.react.fabric

import com.facebook.jni.HybridData
import com.facebook.proguard.annotations.DoNotStripAny

/**
* An empty [ReactNativeConfig] that is backed by the C++ implementation where the defaults
* are stored.
*/
@DoNotStripAny
class EmptyReactNativeConfig : ReactNativeConfig {
private val mHybridData: HybridData = initHybrid()

private external fun initHybrid(): HybridData

external override fun getBool(param: String): Boolean
external override fun getInt64(param: String): Long
external override fun getString(param: String): String
external override fun getDouble(param: String): Double
}

0 comments on commit 0c7008f

Please sign in to comment.