Skip to content

Commit a967f7f

Browse files
committed
chore: wip
1 parent 1658c57 commit a967f7f

6 files changed

Lines changed: 40 additions & 44 deletions

File tree

fixtures/input/example/0010.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
export type DelimiterType = string
32
export const DefaultPhoneDelimiter: DelimiterType = '-'
43
export const DefaultPhonePattern: number[] = [3, 3, 4]

fixtures/output/example/0007.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export declare function calculateValidityDates(options: {
1313
verbose?: boolean
1414
}): void;
1515
declare function generateCertificateExtensions(options: CertificateOptions): void;
16-
export declare function createRootCA(options: CAOptions = {}): Promise<GenerateCertReturn>;
16+
export declare function createRootCA(options: CAOptions): Promise<GenerateCertReturn>;
1717
export declare function generateCertificate(options: CertificateOptions): Promise<GenerateCertReturn>;
1818
export declare function addCertToSystemTrustStoreAndSaveCert(cert: Cert, caCert: string, options?: TlsOption): Promise<string>;
1919
export declare function storeCertificate(cert: Cert, options?: TlsOption): string;

fixtures/output/example/0008.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { CertDetails } from './types';
2+
import { pki } from 'node-forge';
23

34
export declare function isCertValidForDomain(certPemOrPath: string, domain: string): boolean;
45
export declare function readCertFromFile(certPath: string): string;

fixtures/output/example/0009.d.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ export declare function loadConfig<T>({
55
cwd,
66
defaultConfig,
77
endpoint,
8-
headers = {
9-
'Accept': 'application/json',
10-
'Content-Type': 'application/json',
11-
},
8+
headers,
129
}: Config<T>): Promise<T>;
1310

1411
export * from './types'

fixtures/output/example/0010.d.ts

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export declare type DelimiterType = string
2-
export const DefaultPhoneDelimiter: DelimiterType = '-'
3-
export const DefaultPhonePattern: number[] = [3, 3, 4]
2+
export declare const DefaultPhoneDelimiter: '-'
3+
export declare const DefaultPhonePattern: readonly [3, 3, 4]
44

55
export interface FormatPhoneOptions {
66
delimiter?: string
@@ -10,32 +10,32 @@ export interface FormatPhoneOptions {
1010
format?: 'national' | 'international'
1111
}
1212

13-
export const DefaultPhoneRegion = 'US'
13+
export declare const DefaultPhoneRegion: 'US'
1414

15-
const PHONE_PATTERNS: Record<string, number[]> = {
16-
US: [3, 3, 4],
17-
GB: [4, 3, 3],
18-
FR: [2, 2, 2, 2, 2],
19-
DE: [3, 2, 2, 2],
20-
JP: [3, 4, 4],
21-
CN: [3, 4, 4],
22-
IN: [4, 3, 3],
23-
BR: [2, 4, 4],
24-
AU: [4, 3, 3],
25-
CA: [3, 3, 4],
26-
} as const
15+
declare const PHONE_PATTERNS: {
16+
readonly US: readonly [3, 3, 4]
17+
readonly GB: readonly [4, 3, 3]
18+
readonly FR: readonly [2, 2, 2, 2, 2]
19+
readonly DE: readonly [3, 2, 2, 2]
20+
readonly JP: readonly [3, 4, 4]
21+
readonly CN: readonly [3, 4, 4]
22+
readonly IN: readonly [4, 3, 3]
23+
readonly BR: readonly [2, 4, 4]
24+
readonly AU: readonly [4, 3, 3]
25+
readonly CA: readonly [3, 3, 4]
26+
}
2727

28-
const COUNTRY_CODES: Record<string, string> = {
29-
US: '+1',
30-
GB: '+44',
31-
FR: '+33',
32-
DE: '+49',
33-
JP: '+81',
34-
CN: '+86',
35-
IN: '+91',
36-
BR: '+55',
37-
AU: '+61',
38-
CA: '+1',
28+
declare const COUNTRY_CODES: {
29+
readonly US: '+1'
30+
readonly GB: '+44'
31+
readonly FR: '+33'
32+
readonly DE: '+49'
33+
readonly JP: '+81'
34+
readonly CN: '+86'
35+
readonly IN: '+91'
36+
readonly BR: '+55'
37+
readonly AU: '+61'
38+
readonly CA: '+1'
3939
}
4040
declare function handleFormat({ value, delimiter, pattern, region, includeCountryCode, format }: {
4141
value: string

fixtures/output/example/0011.d.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
export declare const bunshPackage: {
2-
name: unknown;
3-
domain: unknown;
4-
description: unknown;
5-
packageYmlUrl: unknown;
6-
homepageUrl: unknown;
7-
githubUrl: unknown;
8-
installCommand: unknown;
9-
programs: readonly ['bun', 'bunx', ''];
2+
name: 'bun';
3+
domain: 'bun.sh';
4+
description: 'Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one';
5+
packageYmlUrl: 'https://github.com/pkgxdev/pantry/tree/main/projects/bun.sh/package.yml';
6+
homepageUrl: '';
7+
githubUrl: 'https://github.com/pkgxdev/pantry/';
8+
installCommand: 'sh <(curl https://pkgx.sh) +bun.sh -- $SHELL -i';
9+
programs: readonly ['bun', 'bunx'];
1010
companions: readonly [''];
1111
dependencies: readonly [''];
1212
versions: readonly [
@@ -127,9 +127,8 @@ export declare const bunshPackage: {
127127
'0.6.1' |
128128
'0.6.0' |
129129
'0.5.9' |
130-
'0.5.6' |
131-
''
130+
'0.5.6'
132131
];
133-
fullPath: unknown;
134-
aliases: readonly ['bun', '']
132+
fullPath: 'bun.sh';
133+
aliases: readonly ['bun']
135134
};

0 commit comments

Comments
 (0)