Skip to content

Commit e8055a4

Browse files
added support for the new integer primitive
1 parent ed139dd commit e8055a4

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# v3.0.4
2+
## Features
3+
- Added support the new `integer` primitive.
4+
15
# v3.0.3
26
## Features
37
- `Negate` now prevents nested negations — if the input is already negated, it returns as-is.

src/init.luau

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,15 @@ end
3434

3535
type function is_primitive(input_tag: string)
3636
return
37+
input_tag == "any" or
3738
input_tag == "unknown" or
3839
input_tag == "never" or
39-
input_tag == "any" or
4040
input_tag == "boolean" or
41+
input_tag == "buffer" or
4142
input_tag == "number" or
42-
input_tag == "string"
43+
input_tag == "integer" or
44+
input_tag == "string" or
45+
input_tag == "thread"
4346
end
4447

4548
type function unions_and_intersections_flatten(input: type)
@@ -346,6 +349,7 @@ type function stringify_main(
346349
elseif input_tag == "any" then return "any"
347350
elseif input_tag == "boolean" then return "boolean"
348351
elseif input_tag == "number" then return "number"
352+
elseif input_tag == "integer" then return "integer"
349353
elseif input_tag == "string" then return "string" end
350354

351355
local input = if input_tag == "singleton" then input:value() else input

wally.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "cameronpcampbell/typeforge"
33
description = "A Type Function utility library."
4-
version = "3.0.3"
4+
version = "3.0.4"
55
registry = "https://github.com/UpliftGames/wally-index"
66
realm = "shared"
77
license = "MIT"

0 commit comments

Comments
 (0)