forked from 1Password/typeshare
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[typeshare] Support linux-arm64 and support u64 (#1)
## Description * Switching build over to `zigbuild` to support linux arm64 variant * Porting over 1Password#140 to support large number * Adding some default overrides to include base types for stuff such as `HashSet` ## Test Plan * Typeshare built for repo ## Revert Plan * Revert
- Loading branch information
1 parent
da98c89
commit 2e2b203
Showing
18 changed files
with
190 additions
and
79 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
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,10 @@ | ||
#[typeshare] | ||
struct DisallowedType { | ||
#[typeshare(typescript(type = "bigint"))] | ||
disallowed_type: u64, | ||
#[typeshare(typescript(type = "number"))] | ||
another_disallowed_type: i64, | ||
#[typeshare(typescript(type = "string"))] | ||
#[serde(with = "my_string_serde_impl")] | ||
disallowed_type_serde_with: u64, | ||
} |
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,9 @@ | ||
package proto | ||
|
||
import "encoding/json" | ||
|
||
type DisallowedType struct { | ||
DisallowedType uint64 `json:"disallowed_type"` | ||
AnotherDisallowedType int64 `json:"another_disallowed_type"` | ||
DisallowedTypeSerdeWith uint64 `json:"disallowed_type_serde_with"` | ||
} |
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,12 @@ | ||
package com.agilebits.onepassword | ||
|
||
import kotlinx.serialization.Serializable | ||
import kotlinx.serialization.SerialName | ||
|
||
@Serializable | ||
data class DisallowedType ( | ||
val disallowed_type: ULong, | ||
val another_disallowed_type: Long, | ||
val disallowed_type_serde_with: ULong | ||
) | ||
|
19 changes: 19 additions & 0 deletions
19
core/data/tests/can_override_disallowed_types/output.scala
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,19 @@ | ||
package com.agilebits | ||
|
||
package object onepassword { | ||
|
||
type UByte = Byte | ||
type UShort = Short | ||
type UInt = Int | ||
type ULong = Int | ||
|
||
} | ||
package onepassword { | ||
|
||
case class DisallowedType ( | ||
disallowed_type: ULong, | ||
another_disallowed_type: Long, | ||
disallowed_type_serde_with: ULong | ||
) | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
core/data/tests/can_override_disallowed_types/output.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,13 @@ | ||
import Foundation | ||
|
||
public struct DisallowedType: Codable { | ||
public let disallowed_type: UInt64 | ||
public let another_disallowed_type: Int64 | ||
public let disallowed_type_serde_with: UInt64 | ||
|
||
public init(disallowed_type: UInt64, another_disallowed_type: Int64, disallowed_type_serde_with: UInt64) { | ||
self.disallowed_type = disallowed_type | ||
self.another_disallowed_type = another_disallowed_type | ||
self.disallowed_type_serde_with = disallowed_type_serde_with | ||
} | ||
} |
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,6 @@ | ||
export interface DisallowedType { | ||
disallowed_type: bigint; | ||
another_disallowed_type: number; | ||
disallowed_type_serde_with: string; | ||
} | ||
|
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
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
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
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
Oops, something went wrong.