Skip to content

Commit

Permalink
Clarify that int and decimal bigInt, bigDecimal (#2608)
Browse files Browse the repository at this point in the history
fix [#2396](#2396)
  • Loading branch information
timotheeguerin authored Nov 1, 2023
1 parent dc95c54 commit 6eab70c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@typespec/compiler",
"comment": "",
"type": "none"
}
],
"packageName": "@typespec/compiler"
}
6 changes: 4 additions & 2 deletions docs/standard-library/built-in-data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ scalar bytes

### `decimal` {#decimal}

A decimal number with any length and precision.
A decimal number with any length and precision. This represent any `decimal` value possible.
It is commonly represented as `BigDecimal` in some languages.

```typespec
scalar decimal
Expand Down Expand Up @@ -286,7 +287,8 @@ scalar int8

### `integer` {#integer}

A whole number
A whole number. This represent any `integer` value possible.
It is commonly represented as `BigInteger` in some languages.

```typespec
scalar integer
Expand Down
6 changes: 4 additions & 2 deletions packages/compiler/lib/lib.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ scalar bytes;
scalar numeric;

/**
* A whole number
* A whole number. This represent any `integer` value possible.
* It is commonly represented as `BigInteger` in some languages.
*/
scalar integer extends numeric;

Expand Down Expand Up @@ -76,7 +77,8 @@ scalar float64 extends float;
scalar float32 extends float64;

/**
* A decimal number with any length and precision.
* A decimal number with any length and precision. This represent any `decimal` value possible.
* It is commonly represented as `BigDecimal` in some languages.
*/
scalar decimal extends numeric;

Expand Down

0 comments on commit 6eab70c

Please sign in to comment.