Skip to content

Commit

Permalink
fix: incorrect types
Browse files Browse the repository at this point in the history
  • Loading branch information
wobsoriano committed Aug 3, 2023
1 parent 97e5554 commit 410f67a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
14 changes: 7 additions & 7 deletions playground.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ const style = blipgloss.NewStyle()

// console.log(style.Render("Hello, bun."))

const style2 = style.Copy()
.Background({
Light: "#2B2D42",
Dark: "#F8F32B"
})
.Width(20)
.Align(blipgloss.Position.Top)
// const style2 = style.Copy()
// .Background({
// Light: "#2B2D42",
// Dark: "#F8F32B"
// })
// .Width(20)
// .Align(blipgloss.Position.Top)

console.log(style.Render("Hello, bun clone."))
2 changes: 1 addition & 1 deletion src/ffi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const { symbols } = dlopen(location, {
returns: FFIType.int
},
Align: {
args: [FFIType.float],
args: [FFIType.ptr, FFIType.float],
returns: FFIType.void
},
Margin: {
Expand Down
14 changes: 7 additions & 7 deletions src/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class Style {
// }

private SetBooleanValue(key: string, value: boolean) {
symbols.SetBooleanValue(this.#handle, ptr(encode(key)), value ? 1 : 0)
symbols.SetBooleanValue(this.#handle, ptr(encode(key)), value)
return this
}

Expand Down Expand Up @@ -201,13 +201,13 @@ export class Style {
return this.SetColorValue('BorderBackground', color)
}

GetBoolValue() {
return symbols.GetBoolValue()
}
// GetBoolValue() {
// return symbols.GetBoolValue()
// }

GetIntValue() {
return symbols.GetIntValue()
}
// GetIntValue() {
// return symbols.GetIntValue()
// }

GetBold(): boolean {
return symbols.GetBoolValue(this.#handle, ptr(encode('GetBold')))
Expand Down

0 comments on commit 410f67a

Please sign in to comment.