Skip to content

Commit

Permalink
feat: stubs for int conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-reimann committed Apr 8, 2024
1 parent 61fd8e6 commit 57a445c
Showing 1 changed file with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,15 @@ class Boolean
/**
* A number.
*/
class Number
class Number {

/**
* Converts the number to an integer.
*/
@Pure
@PythonCall("int($this)")
fun toInt() -> i: Int
}

/**
* An integer.
Expand Down Expand Up @@ -81,4 +89,14 @@ class Map<K, out V> {
/**
* Some text.
*/
class String
class String {

/**
* Converts the string to an integer.
*
* @base The base of the integer.
*/
@Pure
@PythonCall("int($this, $base)")
fun toInt(base: Int = 10) -> i: Int
}

0 comments on commit 57a445c

Please sign in to comment.