(options: Options)
| 447 | } |
| 448 | |
| 449 | $setOptions<Options extends ClientOptions<SchemaDef>>(options: Options): ClientContract<SchemaDef, Options> { |
| 450 | const newClient = new ClientImpl(this.schema, options as ClientOptions<SchemaDef>, this); |
| 451 | // create a new validator to have a fresh schema cache, because options may change validation settings |
| 452 | newClient.inputValidator = new InputValidator(newClient as any, { |
| 453 | enabled: newClient.$options.validateInput !== false, |
| 454 | }); |
| 455 | return newClient as unknown as ClientContract<SchemaDef, Options>; |
| 456 | } |
| 457 | |
| 458 | $setInputValidation(enable: boolean) { |
| 459 | const newOptions: ClientOptions<SchemaDef> = { |
no outgoing calls
no test coverage detected