-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
69 additions
and
92 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
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
2 changes: 2 additions & 0 deletions
2
packages/react-native-nitro-modules/cpp/react-native-nitro.cpp
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
15 changes: 15 additions & 0 deletions
15
packages/react-native-nitro-modules/ios/core/HybridObject.swift
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,15 @@ | ||
// | ||
// HybridObject.swift | ||
// NitroModules | ||
// | ||
// Created by Marc Rousavy on 20.06.24. | ||
// | ||
|
||
import Foundation | ||
|
||
public class HybridObject { | ||
|
||
init(value: String) { | ||
print("Hey \(value)!") | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
packages/react-native-nitro-modules/ios/core/Promise.swift
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 |
---|---|---|
@@ -1,2 +1,17 @@ | ||
|
||
import Foundation | ||
|
||
/** | ||
Represents a JavaScript Promise. | ||
Uses the highly efficient C++ JSI implementation under the hood. | ||
*/ | ||
public class Promise { | ||
private let promise: margelo.Promise | ||
|
||
init() { | ||
let hy: margelo.HybridObject? = nil | ||
let x: margelo.PromiseFactory.RunPromise? = nil | ||
let y = nitro.multiply(0, 0) | ||
} | ||
|
||
} |