File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ and this project adheres to
1010
1111### Added
1212
13+ - Export error classes.
14+
1315### Changed
1416
1517### Fixed
Original file line number Diff line number Diff line change 11export type { Config } from "./src/config.ts" ;
22export { config } from "./src/config.ts" ;
33
4+ export { InvalidTimeoutError , MissingApiKeyError } from "./src/errors.ts" ;
5+
46export type {
57 AccountApiParameters ,
68 AccountInformation ,
Original file line number Diff line number Diff line change @@ -22,14 +22,14 @@ import {
2222 assertStringIncludes ,
2323} from "https://deno.land/std@0.170.0/testing/asserts.ts" ;
2424import { _internals } from "../../src/utils.ts" ;
25- import { MissingApiKeyError } from "../../src/errors.ts" ;
2625import {
26+ config ,
2727 getHtml ,
2828 getHtmlBySearchId ,
2929 getJson ,
3030 getJsonBySearchId ,
31- } from "../../src/serpapi.ts" ;
32- import { config } from "../../src/config .ts" ;
31+ MissingApiKeyError ,
32+ } from "../../mod .ts" ;
3333
3434loadSync ( { export : true } ) ;
3535const SERPAPI_TEST_KEY = Deno . env . get ( "SERPAPI_TEST_KEY" ) ?? "" ;
Original file line number Diff line number Diff line change @@ -12,10 +12,14 @@ import {
1212 assertRejects ,
1313} from "https://deno.land/std@0.170.0/testing/asserts.ts" ;
1414import { Stub , stub } from "https://deno.land/std@0.170.0/testing/mock.ts" ;
15- import { InvalidTimeoutError , MissingApiKeyError } from "../src/errors.ts" ;
16- import { getAccount , getLocations } from "../src/serpapi.ts" ;
1715import { _internals } from "../src/utils.ts" ;
18- import { config } from "../src/config.ts" ;
16+ import {
17+ config ,
18+ getAccount ,
19+ getLocations ,
20+ InvalidTimeoutError ,
21+ MissingApiKeyError ,
22+ } from "../mod.ts" ;
1923
2024loadSync ( { export : true } ) ;
2125const SERPAPI_TEST_KEY = Deno . env . get ( "SERPAPI_TEST_KEY" ) ?? "" ;
Original file line number Diff line number Diff line change 88 assertThrows ,
99} from "https://deno.land/std@0.170.0/testing/asserts.ts" ;
1010import { validateApiKey , validateTimeout } from "../src/validators.ts" ;
11- import { config } from "../src/config.ts" ;
12- import { InvalidTimeoutError , MissingApiKeyError } from "../src/errors.ts" ;
11+ import { config , InvalidTimeoutError , MissingApiKeyError } from "../mod.ts" ;
1312
1413describe ( "validateApiKey" , ( ) => {
1514 afterEach ( ( ) => {
You can’t perform that action at this time.
0 commit comments