diff --git a/common/changes/@typespec/compiler/big-int-decimal-doc_2023-10-26-21-09.json b/common/changes/@typespec/compiler/big-int-decimal-doc_2023-10-26-21-09.json new file mode 100644 index 0000000000..5945164bd2 --- /dev/null +++ b/common/changes/@typespec/compiler/big-int-decimal-doc_2023-10-26-21-09.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@typespec/compiler", + "comment": "", + "type": "none" + } + ], + "packageName": "@typespec/compiler" +} \ No newline at end of file diff --git a/docs/standard-library/built-in-data-types.md b/docs/standard-library/built-in-data-types.md index 5401baf9d3..a7d0000555 100644 --- a/docs/standard-library/built-in-data-types.md +++ b/docs/standard-library/built-in-data-types.md @@ -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 @@ -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 diff --git a/packages/compiler/lib/lib.tsp b/packages/compiler/lib/lib.tsp index a6ba028692..a31305f8c9 100644 --- a/packages/compiler/lib/lib.tsp +++ b/packages/compiler/lib/lib.tsp @@ -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; @@ -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;