1- declare module 'lab' {
1+ declare module Lab {
22 type ScriptOptions = {
33 schedule ?: boolean ;
44 cli ?: CommandLineSettings ;
@@ -9,7 +9,7 @@ declare module 'lab' {
99 * `globals` split into an array, `id` moved to `ids`, and silence`
1010 * and `verbose` being flattened into `progress`.
1111 */
12- type CommandLineSettings = {
12+ interface CommandLineSettings {
1313 /** An assertion library module path to require and make available under `Lab.assertions` */
1414 assert ?: string ;
1515
@@ -110,12 +110,12 @@ declare module 'lab' {
110110 verbose ?: boolean ;
111111 }
112112
113- export type ReporterType = 'clover' | 'console' | 'html' | 'json' | 'junit' | 'lcov' | 'tap' ;
113+ type ReporterType = 'clover' | 'console' | 'html' | 'json' | 'junit' | 'lcov' | 'tap' ;
114114
115115 /**
116116 * Progress reporting level
117117 */
118- export const enum ProgressReporting {
118+ const enum ProgressReporting {
119119 /** No dots or test names */
120120 Silence = 0 ,
121121
@@ -158,14 +158,16 @@ declare module 'lab' {
158158 */
159159 type Hook = TakesCallback | ReturnsPromise ;
160160
161- export type Laboratory = {
161+ type Script = {
162162 experiment : ( description : string , experiment : Experiment ) => any ;
163163 test : ( description : string , test : Test ) => any ;
164164 before : ( fn : Hook ) => void ;
165165 beforeEach : ( fn : Hook ) => void ;
166166 after : ( fn : Hook ) => void ;
167167 afterEach : ( fn : Hook ) => void ;
168168 }
169+ }
169170
170- export function script ( options ?: Lab . ScriptOptions ) : Laboratory ;
171+ declare module 'lab' {
172+ export function script ( options ?: Lab . ScriptOptions ) : Lab . Script ;
171173}
0 commit comments