-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow a single-element
concurrency
option in function definitions (#…
…462) ## Summary <!-- Succinctly describe your change, providing context, what you've changed, and why. --> Fixes `concurrency: [ConcurrencyOption]` not being allowed. ## Checklist <!-- Tick these items off as you progress. --> <!-- If an item isn't applicable, ideally please strikeout the item by wrapping it in "~~"" and suffix it with "N/A My reason for skipping this." --> <!-- e.g. "- [ ] ~~Added tests~~ N/A Only touches docs" --> - [ ] ~~Added a [docs PR](https://github.com/inngest/website) that references this PR~~ N/A Bug fix - [ ] ~~Added unit/integration tests~~ N/A - [x] Added changesets if applicable
- Loading branch information
1 parent
c55e3bc
commit c449efe
Showing
5 changed files
with
62 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"inngest": patch | ||
--- | ||
|
||
Fix not allowing a single-element `concurrency` option in function definitions |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { type RecursiveTuple } from "@local/helpers/types"; | ||
import { assertType, type IsEqual } from "type-plus"; | ||
|
||
describe("RecursiveTuple", () => { | ||
test("should create a tuple of length 1", () => { | ||
type Expected = [string]; | ||
type Actual = RecursiveTuple<string, 1>; | ||
assertType<IsEqual<Expected, Actual>>(true); | ||
}); | ||
|
||
test("should create a tuple of length 2", () => { | ||
type Expected = [string] | [string, string]; | ||
type Actual = RecursiveTuple<string, 2>; | ||
assertType<IsEqual<Expected, Actual>>(true); | ||
}); | ||
|
||
test("should create a tuple of length 3", () => { | ||
type Expected = [string] | [string, string] | [string, string, string]; | ||
type Actual = RecursiveTuple<string, 3>; | ||
assertType<IsEqual<Expected, Actual>>(true); | ||
}); | ||
|
||
test("should create a tuple with mixed primitives", () => { | ||
type Expected = [string | number] | [string | number, string | number]; | ||
type Actual = RecursiveTuple<string | number, 2>; | ||
assertType<IsEqual<Expected, Actual>>(true); | ||
}); | ||
|
||
test("should expand type aliases of primitives", () => { | ||
type T0 = string; | ||
type Expected = [string] | [string, string]; | ||
type Actual = RecursiveTuple<T0, 2>; | ||
assertType<IsEqual<Expected, Actual>>(true); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters