Skip to content

Commit dead91a

Browse files
committed
fix: place @lwrjs/api declaration file in multiple locations for better module resolution
1 parent 5fc3032 commit dead91a

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

lwrjs-api.d.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright (c) 2023, salesforce.com, inc.
3+
* All rights reserved.
4+
* Licensed under the BSD 3-Clause license.
5+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6+
*/
7+
8+
/* eslint-disable */
9+
declare module '@lwrjs/api' {
10+
export interface SitesLocalDevOptions {
11+
sfCLI: boolean;
12+
authToken: string;
13+
open: boolean;
14+
port: number;
15+
logLevel: string;
16+
mode: string;
17+
siteZip?: string;
18+
siteDir: string;
19+
}
20+
21+
export function expDev(options: SitesLocalDevOptions): Promise<void>;
22+
export function setupDev(options: SitesLocalDevOptions): Promise<void>;
23+
}
24+
25+
// Handle CJS module resolution
26+
declare module '@lwrjs/api/build/cjs/index.cjs' {
27+
export interface SitesLocalDevOptions {
28+
sfCLI: boolean;
29+
authToken: string;
30+
open: boolean;
31+
port: number;
32+
logLevel: string;
33+
mode: string;
34+
siteZip?: string;
35+
siteDir: string;
36+
}
37+
38+
export function expDev(options: SitesLocalDevOptions): Promise<void>;
39+
export function setupDev(options: SitesLocalDevOptions): Promise<void>;
40+
}

src/types/lwrjs-api.d.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright (c) 2023, salesforce.com, inc.
3+
* All rights reserved.
4+
* Licensed under the BSD 3-Clause license.
5+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6+
*/
7+
8+
/* eslint-disable */
9+
declare module '@lwrjs/api' {
10+
export interface SitesLocalDevOptions {
11+
sfCLI: boolean;
12+
authToken: string;
13+
open: boolean;
14+
port: number;
15+
logLevel: string;
16+
mode: string;
17+
siteZip?: string;
18+
siteDir: string;
19+
}
20+
21+
export function expDev(options: SitesLocalDevOptions): Promise<void>;
22+
export function setupDev(options: SitesLocalDevOptions): Promise<void>;
23+
}
24+
25+
// Handle CJS module resolution
26+
declare module '@lwrjs/api/build/cjs/index.cjs' {
27+
export interface SitesLocalDevOptions {
28+
sfCLI: boolean;
29+
authToken: string;
30+
open: boolean;
31+
port: number;
32+
logLevel: string;
33+
mode: string;
34+
siteZip?: string;
35+
siteDir: string;
36+
}
37+
38+
export function expDev(options: SitesLocalDevOptions): Promise<void>;
39+
export function setupDev(options: SitesLocalDevOptions): Promise<void>;
40+
}

0 commit comments

Comments
 (0)