From 2375a3b2cd26ab9ecb1a49c6dd09d4dc5a814c1e Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Fri, 28 Aug 2020 18:55:50 +0200 Subject: [PATCH] docs: added positive integer (#4078) * docs: added positive integer * added to toc --- docs/annotating_code/type_syntax/atomic_types.md | 1 + docs/annotating_code/type_syntax/scalar_types.md | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/docs/annotating_code/type_syntax/atomic_types.md b/docs/annotating_code/type_syntax/atomic_types.md index 7183f40f6..6651e8150 100644 --- a/docs/annotating_code/type_syntax/atomic_types.md +++ b/docs/annotating_code/type_syntax/atomic_types.md @@ -5,6 +5,7 @@ Atomic types are the basic building block of all type information used in Psalm. ## [Scalar types](scalar_types.md) - [int](scalar_types.md) +- [positive-int](scalar_types.md#positive-int) - [float](scalar_types.md) - [string](scalar_types.md) - [class-string and class-string<Foo>](scalar_types.md#class-string) diff --git a/docs/annotating_code/type_syntax/scalar_types.md b/docs/annotating_code/type_syntax/scalar_types.md index 2dfdebc55..4fac0154a 100644 --- a/docs/annotating_code/type_syntax/scalar_types.md +++ b/docs/annotating_code/type_syntax/scalar_types.md @@ -10,6 +10,10 @@ The type `scalar` is the supertype of all scalar types. `array-key` is the supertype (but not a union) of `int` and `string`. +### positive-int + +`positive-int` allows only positive integers + ### numeric `numeric` is a supertype of `int` or `float` and [`numeric-string`](#numeric-string).