Skip to content

Commit

Permalink
Changed 6 files.
Browse files Browse the repository at this point in the history
  • Loading branch information
svermeulen committed Sep 19, 2024
1 parent c9f5ab5 commit 9532d39
Show file tree
Hide file tree
Showing 6 changed files with 1,428 additions and 1,621 deletions.
12 changes: 6 additions & 6 deletions types/argparse.d.tl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ local record argparse
flag: function(self: Parser, flag: string): Option
flag: function(self: Parser, shortalias: string, longalias: string): Option

parse: function(self: Parser, argv: {string}): Args
pparse: function(self: Parser, argv: {string}): boolean, Args | string
parse: function(self: Parser, argv?: {string}): Args
pparse: function(self: Parser, argv?: {string}): boolean, Args | string

error: function(self: Parser, error: string)

Expand All @@ -20,8 +20,8 @@ local record argparse
get_usage: function(self: Parser): string
get_help: function(self: Parser): string

option: function(self: Parser, name: string, description: string, default: string, convert: function | {function}, args: {string}, count: number | string): Option
option: function(self: Parser, name: string, description: string, default: string, convert: {string:string}, args: {string}, count: number | string): Option
option: function(self: Parser, name: string, description?: string, default?: string, convert?: function | {function}, args?: {string}, count: number | string): Option
option: function(self: Parser, name: string, description?: string, default?: string, convert?: {string:string}, args?: {string}, count: number | string): Option

require_command: function(self: Parser, require_command: boolean): Parser
command_target: function(self: Parser, command_target: string): Parser
Expand Down Expand Up @@ -82,12 +82,12 @@ local record argparse

argument: function(self: Command, name: string, description: string): Argument

option: function(self: Command, name: string, description: string): Option
option: function(self: Command, name: string, description?: string): Option

flag: function(self: Command, string, string): Option
end

metamethod __call: function(self: argparse, name: string, description: string, epilog: string): Parser
metamethod __call: function(self: argparse, name: string, description?: string, epilog?: string): Parser
end

return argparse
4 changes: 2 additions & 2 deletions types/dkjson.d.tl
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ local record dkjson
tables: {table:boolean}
exception: function(string, string, string, string): boolean|string, string
end
encode: function({string:any}, JsonState): string
encode: function({string:any}, ?JsonState): string

decode: function(string, number, any, table): {string:any}
decode: function(string, ?number, ?any, ?table): {string:any}

null: table

Expand Down
2 changes: 1 addition & 1 deletion types/inspect.d.tl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local record inspect
process: function(item: any, path: {any}): any
end

metamethod __call: function(self: inspect, value: any, options: InspectOptions): string
metamethod __call: function(self: inspect, value: any, options?: InspectOptions): string
end

return inspect
6 changes: 3 additions & 3 deletions types/lusc.d.tl
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ local record lusc
-- TODO
-- start:function()

start_soon:function(self: Nursery, func:function(), Task.Opts)
start_soon:function(self: Nursery, func:function(), ?Task.Opts)
end

open_nursery:function(handler:function(nursery:Nursery), opts:Nursery.Opts):CancelScope.Result
Expand All @@ -157,7 +157,7 @@ local record lusc
-- Note that this will only cancel tasks if one of the move_on* or fail_* options
-- are provided. Otherwise it will wait forever for tasks to complete gracefully
-- Note also that if block_until_stopped is provided, it will block
stop:function(opts:DeadlineOpts)
stop:function(opts?:DeadlineOpts)

-- Long running tasks can check this periodically, and then shut down
-- gracefully, instead of relying on cancels
Expand Down Expand Up @@ -186,7 +186,7 @@ local record lusc
-- and also that it only consists of the cancelled error
is_cancelled_error:function(err:any):boolean

schedule:function(handler:function(), opts:Task.Opts)
schedule:function(handler:function(), opts?:Task.Opts)

schedule_wrap: function(function(), opts:Task.Opts): function()
schedule_wrap: function<T>(function(T), opts:Task.Opts): function(T)
Expand Down
Loading

0 comments on commit 9532d39

Please sign in to comment.