Skip to content

Commit 7f21193

Browse files
committed
export proto and impl types and fix type for constructor function
1 parent 891997e commit 7f21193

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- Changed type exports to include impl and proto
13+
14+
### Fixed
15+
16+
- Fixed type for .new()
17+
1018
## [0.1.0] - 2025-11-06
1119

1220
- Initial release

src/init.luau

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type Settings = VM.Settings
1515
local Graft = {} :: impl
1616
Graft.__index = Graft
1717

18-
type self = {
18+
export type proto = {
1919
Source: string,
2020
Interface: Interface,
2121
Module: Module?,
@@ -26,17 +26,17 @@ type self = {
2626

2727
Settings: Settings,
2828
}
29-
type impl = {
29+
export type impl = {
3030
__index: impl,
3131

32-
new: (interface: Interface) -> Graft,
32+
new: (interface: Interface, source: string?) -> Graft,
3333

3434
IsGrafted: () -> boolean,
3535
Patch: (self: Graft) -> (),
3636
Run: (self: Graft, ...any) -> ...any,
3737
}
3838

39-
export type Graft = typeof(setmetatable({} :: self, Graft))
39+
export type Graft = typeof(setmetatable({} :: proto, Graft))
4040

4141
local function getDefaultSettings(): Settings
4242
local settings = VM.luau_newsettings()

0 commit comments

Comments
 (0)