Skip to content

Commit 15e11d2

Browse files
fix(types): enhance accuracy of type definitions (#379)
1 parent 58c2416 commit 15e11d2

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

src/configure.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ interface ConfigureResult {
3434
proxy: (proxyParams: ProxyParams) => Promise<Object>;
3535
}
3636

37-
declare function configure(configureParams: ConfigureParams): ConfigureResult;
37+
declare function configure(configureParams: ConfigureParams): Handler & ConfigureResult;
3838

3939
// declare function proxy(proxyParams: ProxyParams): Promise<any>
4040

src/current-invoke.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export interface CurrentInvoke {
2+
event?: any;
3+
context?: any;
4+
}
5+
6+
export declare function getCurrentInvoke(): CurrentInvoke;

src/index.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
import Configure from "./configure"
1+
import configure from "./configure"
22

3-
export = Configure
3+
export default configure;
4+
export { default as configure } from "./configure"
5+
export { getCurrentInvoke } from "./current-invoke"

0 commit comments

Comments
 (0)