nitrogen 0.35.0-beta.0 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,10 +22,6 @@ data class ${innerName}(@DoNotStrip val value: ${bridge.getTypeCode('kotlin')}):
22
22
  `.trim();
23
23
  });
24
24
  const packageName = NitroConfig.current.getAndroidPackage('java/kotlin');
25
- const getterCases = variant.cases.map(([label]) => {
26
- const innerName = capitalizeName(label);
27
- return `is ${innerName} -> value as? T`;
28
- });
29
25
  const isFunctions = variant.cases.map(([label]) => {
30
26
  const innerName = capitalizeName(label);
31
27
  return `
@@ -83,11 +79,6 @@ ${extraImports.join('\n')}
83
79
  sealed class ${kotlinName} {
84
80
  ${indent(innerClasses.join('\n'), ' ')}
85
81
 
86
- @Deprecated("getAs() is not type-safe. Use fold/asFirstOrNull/asSecondOrNull instead.", level = DeprecationLevel.ERROR)
87
- inline fun <reified T> getAs(): T? = when (this) {
88
- ${indent(getterCases.join('\n'), ' ')}
89
- }
90
-
91
82
  ${indent(isFunctions.join('\n'), ' ')}
92
83
 
93
84
  ${indent(asFunctions.join('\n'), ' ')}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nitrogen",
3
- "version": "0.35.0-beta.0",
3
+ "version": "0.35.0",
4
4
  "description": "The code-generator for react-native-nitro-modules.",
5
5
  "main": "lib/index",
6
6
  "types": "lib/index.d.ts",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "chalk": "^5.3.0",
38
- "react-native-nitro-modules": "^0.35.0-beta.0",
38
+ "react-native-nitro-modules": "^0.35.0",
39
39
  "ts-morph": "^27.0.0",
40
40
  "yargs": "^18.0.0",
41
41
  "zod": "^4.0.5"
@@ -30,10 +30,6 @@ data class ${innerName}(@DoNotStrip val value: ${bridge.getTypeCode('kotlin')}):
30
30
  })
31
31
 
32
32
  const packageName = NitroConfig.current.getAndroidPackage('java/kotlin')
33
- const getterCases = variant.cases.map(([label]) => {
34
- const innerName = capitalizeName(label)
35
- return `is ${innerName} -> value as? T`
36
- })
37
33
  const isFunctions = variant.cases.map(([label]) => {
38
34
  const innerName = capitalizeName(label)
39
35
  return `
@@ -94,11 +90,6 @@ ${extraImports.join('\n')}
94
90
  sealed class ${kotlinName} {
95
91
  ${indent(innerClasses.join('\n'), ' ')}
96
92
 
97
- @Deprecated("getAs() is not type-safe. Use fold/asFirstOrNull/asSecondOrNull instead.", level = DeprecationLevel.ERROR)
98
- inline fun <reified T> getAs(): T? = when (this) {
99
- ${indent(getterCases.join('\n'), ' ')}
100
- }
101
-
102
93
  ${indent(isFunctions.join('\n'), ' ')}
103
94
 
104
95
  ${indent(asFunctions.join('\n'), ' ')}