Skip to content

Commit d0f033c

Browse files
committed
fix: Fix TS error
1 parent 43b1489 commit d0f033c

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

package/src/native/FilamentProxy.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
11
import { FilamentNativeModule } from './FilamentNativeModule'
22

3+
interface TestHybridObject {
4+
int: number
5+
string: string
6+
7+
multipleArguments(first: number, second: boolean, third: string): Record<string, number>
8+
getIntGetter(): () => number
9+
sayHelloCallback(callback: () => string): void
10+
createNewHybridObject: () => TestHybridObject
11+
}
12+
313
export interface TFilamentProxy {
414
/**
515
* Loads a 3D Model from the given path.
616
* @param path A web URL (http:// or https://), local file (file://) or resource ID.
717
*/
818
loadModel(path: string): number
19+
20+
/**
21+
* @private
22+
*/
23+
createTestObject(): TestHybridObject
924
}
1025

1126
// Check if we are running on-device (JSI)

package/src/test/TestHybridObject.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,10 @@
11
import { FilamentProxy } from '../native/FilamentProxy'
22

3-
interface TestHybridObject {
4-
int: number
5-
string: string
6-
7-
multipleArguments(first: number, second: boolean, third: string): Record<string, number>
8-
getIntGetter(): () => number
9-
sayHelloCallback(callback: () => string): void
10-
createNewHybridObject: () => TestHybridObject
11-
}
12-
133
export function testHybridObject() {
144
console.log('------ BEGIN HybridObject tests...')
155
// 1. Creation
166
console.log('Creating HybridObject...')
17-
const hybridObject = FilamentProxy.createTestObject() as TestHybridObject
7+
const hybridObject = FilamentProxy.createTestObject()
188
console.log('Created HybridObject!')
199

2010
// 2. Logging the entire thing as JSON

0 commit comments

Comments
 (0)