Skip to content

Commit 04b1b23

Browse files
Formatted non-letter and recently changed types with dprint
1 parent 3944f93 commit 04b1b23

56 files changed

Lines changed: 13944 additions & 13687 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

types/11ty__eleventy-img/11ty__eleventy-img-tests.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import Image = require('@11ty/eleventy-img');
2-
import type { ImgAttributes, PictureAttributes, SourceAttributes } from '@11ty/eleventy-img/generate-html';
1+
import Image = require("@11ty/eleventy-img");
2+
import type { ImgAttributes, PictureAttributes, SourceAttributes } from "@11ty/eleventy-img/generate-html";
33

44
Image.concurrency = 4;
55

@@ -10,21 +10,21 @@ function isImg<T>(
1010
}
1111

1212
(async () => {
13-
const url = 'https://images.unsplash.com/photo-1608178398319-48f814d0750c';
13+
const url = "https://images.unsplash.com/photo-1608178398319-48f814d0750c";
1414
let stats: Image.Metadata = await Image(url, {
1515
widths: [300],
1616
});
1717

1818
stats = await Image(url, {
1919
widths: [200, null],
20-
formats: ['avif', 'webp', 'svg', null],
21-
urlPath: '/img/',
22-
outputDir: './img/',
20+
formats: ["avif", "webp", "svg", null],
21+
urlPath: "/img/",
22+
outputDir: "./img/",
2323
svgShortCircuit: true,
2424
svgAllowUpscale: false,
2525
cacheOptions: {
26-
duration: '1d',
27-
directory: '.cache',
26+
duration: "1d",
27+
directory: ".cache",
2828
removeUrlQueryParams: false,
2929
},
3030
filenameFormat(id, src, width, format, options) {
@@ -41,14 +41,14 @@ function isImg<T>(
4141
});
4242

4343
stats = Image.statsSync(url, {
44-
formats: ['jpg', 'svg+xml', 'auto'],
44+
formats: ["jpg", "svg+xml", "auto"],
4545
sharpOptions: {
4646
animated: true,
4747
},
4848
});
4949

5050
const attributes = Image.generateObject(stats, {
51-
alt: 'Sample image',
51+
alt: "Sample image",
5252
});
5353
if (isImg(attributes)) {
5454
console.log(attributes.img);
@@ -61,13 +61,13 @@ function isImg<T>(
6161
return Image.generateHTML(
6262
stats,
6363
{
64-
alt: '',
65-
sizes: '100vw',
66-
loading: 'lazy',
67-
decoding: 'async',
64+
alt: "",
65+
sizes: "100vw",
66+
loading: "lazy",
67+
decoding: "async",
6868
},
6969
{
70-
whitespaceMode: 'inline',
70+
whitespaceMode: "inline",
7171
},
7272
);
7373
})();

types/11ty__eleventy-img/generate-html.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Metadata } from '.';
1+
import { Metadata } from ".";
22

33
declare namespace generateHTML {
44
/**
@@ -53,7 +53,7 @@ declare namespace generateHTML {
5353
* (a must-have for use in markdown files).
5454
* @default 'block'
5555
*/
56-
whitespaceMode?: 'inline' | 'block';
56+
whitespaceMode?: "inline" | "block";
5757
}
5858
}
5959

types/11ty__eleventy-img/index.d.ts

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
// Minimum TypeScript Version: 4.2
66

77
/// <reference types="node" />
8-
import sharp = require('sharp');
9-
import generateImageHTML = require('./generate-html');
8+
import sharp = require("sharp");
9+
import generateImageHTML = require("./generate-html");
1010

1111
type Awaitable<T> = PromiseLike<T> | T;
1212
type WithImplicitCoercion<T> = T | { valueOf(): T };
1313

1414
declare namespace EleventyImage {
1515
type ImageSource = string | URL | Buffer;
16-
type ImageFormat = 'webp' | 'jpeg' | 'png' | 'svg' | 'avif';
17-
type ImageFormatWithAliases = ImageFormat | 'jpg' | 'svg+xml';
16+
type ImageFormat = "webp" | "jpeg" | "png" | "svg" | "avif";
17+
type ImageFormatWithAliases = ImageFormat | "jpg" | "svg+xml";
1818

1919
type FormatHook = (
2020
this: MetadataEntry,
@@ -25,7 +25,7 @@ declare namespace EleventyImage {
2525
/**
2626
* @default 'buffer'
2727
*/
28-
type?: 'buffer' | 'json' | 'text';
28+
type?: "buffer" | "json" | "text";
2929
/**
3030
* @default ".cache"
3131
*/
@@ -56,14 +56,14 @@ declare namespace EleventyImage {
5656
* - `null` and `'auto'` represent the original image width.
5757
* @default [null]
5858
*/
59-
widths?: ReadonlyArray<number | 'auto' | null>;
59+
widths?: ReadonlyArray<number | "auto" | null>;
6060
/**
6161
* Controls the output image formats.
6262
* - `null and `'auto'` keep the original format.
6363
* - `svg` requires SVG input to work.
6464
* @default ['webp', 'jpeg']
6565
*/
66-
formats?: ReadonlyArray<ImageFormatWithAliases | 'auto' | null>;
66+
formats?: ReadonlyArray<ImageFormatWithAliases | "auto" | null>;
6767
/**
6868
* @default 10
6969
*/
@@ -152,12 +152,12 @@ declare namespace EleventyImage {
152152
*/
153153
filenameFormat?:
154154
| ((
155-
id: string,
156-
src: string,
157-
width: number,
158-
format: string,
159-
options: Required<ImageOptions>,
160-
) => string | null | undefined)
155+
id: string,
156+
src: string,
157+
width: number,
158+
format: string,
159+
options: Required<ImageOptions>,
160+
) => string | null | undefined)
161161
| null
162162
| undefined;
163163

@@ -179,14 +179,14 @@ declare namespace EleventyImage {
179179
*/
180180
urlFormat?:
181181
| ((
182-
format: {
183-
hash: string;
184-
src: string;
185-
width: number;
186-
format: string;
187-
},
188-
options: Required<ImageOptions>,
189-
) => string)
182+
format: {
183+
hash: string;
184+
src: string;
185+
width: number;
186+
format: string;
187+
},
188+
options: Required<ImageOptions>,
189+
) => string)
190190
| null;
191191

192192
/**
@@ -290,7 +290,7 @@ declare namespace EleventyImage {
290290
function statsByDimensionsSync(src: ImageSource, width: number, height: number, opts?: ImageOptions): Metadata;
291291

292292
function getFormats(
293-
formats: string | ReadonlyArray<ImageFormatWithAliases | null | 'auto'>,
293+
formats: string | ReadonlyArray<ImageFormatWithAliases | null | "auto">,
294294
autoFormat: ImageFormat,
295295
): ImageFormat[];
296296
function getFormats(
@@ -300,7 +300,7 @@ declare namespace EleventyImage {
300300

301301
function getWidths(
302302
originalWidth: number,
303-
widths?: ReadonlyArray<number | 'auto' | null>,
303+
widths?: ReadonlyArray<number | "auto" | null>,
304304
allowUpscale?: boolean,
305305
): number[];
306306

@@ -311,7 +311,7 @@ declare namespace EleventyImage {
311311
isRemoteUrl: boolean;
312312
options: Required<ImageOptions>;
313313

314-
cacheOptions?: Required<ImageOptions['cacheOptions']>;
314+
cacheOptions?: Required<ImageOptions["cacheOptions"]>;
315315

316316
constructor(src: ImageSource, opts?: ImageOptions);
317317

types/3box/3box-tests.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import Box = require('3box');
1+
import Box = require("3box");
22

33
(async () => {
4-
const box = await Box.openBox('foo', {});
5-
const space = await box.openSpace('bar');
6-
const thread = await space.joinThread('baz');
7-
await thread.post('hello 3box');
4+
const box = await Box.openBox("foo", {});
5+
const space = await box.openSpace("bar");
6+
const thread = await space.joinThread("baz");
7+
await thread.post("hello 3box");
88
})();

types/3box/index.d.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ declare class Box {
110110
static isLoggedIn(address: string): boolean;
111111
static create(ethereumProvider: any): Promise<Box>;
112112

113-
openSpace(name: string, opts?: { consentCallback?: (() => void) | undefined; onSyncDone?: (() => void) | undefined }): Promise<Box.Space>;
113+
openSpace(
114+
name: string,
115+
opts?: { consentCallback?: (() => void) | undefined; onSyncDone?: (() => void) | undefined },
116+
): Promise<Box.Space>;
114117
auth(space: string[], user: { address: string }): void;
115118
syncDone: Promise<Box.Space>;
116119
onSyncDone(syncDoneFn: () => void): void;
@@ -148,5 +151,8 @@ declare class Box {
148151
members: boolean,
149152
opts?: { profileServer?: string | undefined },
150153
): Promise<Box.ThreadPost[]>;
151-
static getThreadByAddress(address: string, opts?: { profileServer?: string | undefined }): Promise<Box.ThreadPost[]>;
154+
static getThreadByAddress(
155+
address: string,
156+
opts?: { profileServer?: string | undefined },
157+
): Promise<Box.ThreadPost[]>;
152158
}

types/7zip-min/7zip-min-tests.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import _7z = require('7zip-min');
1+
import _7z = require("7zip-min");
22

33
// $ExpectType void
4-
_7z.pack('index.d.ts', 'archive.7z', err => {});
4+
_7z.pack("index.d.ts", "archive.7z", err => {});
55
// $ExpectType void
6-
_7z.unpack('archive.7z', './', err => {});
6+
_7z.unpack("archive.7z", "./", err => {});
77
// $ExpectType void
8-
_7z.unpack('archive.7z', err => {});
8+
_7z.unpack("archive.7z", err => {});
99
// $ExpectType void
10-
_7z.list('archive.7z', (err, result) => {
10+
_7z.list("archive.7z", (err, result) => {
1111
if (err) {
1212
return;
1313
}

types/alpinejs__morph/alpinejs__morph-tests.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import morphPlugin, { morph } from '@alpinejs/morph';
2-
import Alpine from 'alpinejs';
1+
import morphPlugin, { morph } from "@alpinejs/morph";
2+
import Alpine from "alpinejs";
33

44
Alpine.plugin(morphPlugin);
55

6-
const originalNode = document.createElement('div');
6+
const originalNode = document.createElement("div");
77

8-
Alpine.morph(originalNode, '<div></div>', {
8+
Alpine.morph(originalNode, "<div></div>", {
99
updating(from, to, childrenOnly, skip) {
1010
// $ExpectType Node
1111
from;
@@ -52,12 +52,12 @@ Alpine.morph(originalNode, '<div></div>', {
5252
// $ExpectType Node
5353
el;
5454

55-
return 'key';
55+
return "key";
5656
},
5757
lookahead: true,
5858
});
5959

60-
morph(originalNode, document.createElement('div'), {
60+
morph(originalNode, document.createElement("div"), {
6161
updating(from, to, childrenOnly, skip) {
6262
// $ExpectType Node
6363
from;
@@ -104,7 +104,7 @@ morph(originalNode, document.createElement('div'), {
104104
// $ExpectType Node
105105
el;
106106

107-
return 'key';
107+
return "key";
108108
},
109109
lookahead: true,
110110
});

types/alpinejs__morph/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
55
// Minimum TypeScript Version: 4.6
66

7-
import type { PluginCallback } from 'alpinejs';
7+
import type { PluginCallback } from "alpinejs";
88

99
declare const morphPlugin: PluginCallback;
1010

@@ -64,7 +64,7 @@ type Morph = (from: Node, to: string | Node, options: Partial<MorphOptions>) =>
6464

6565
export const morph: Morph;
6666

67-
declare module 'alpinejs' {
67+
declare module "alpinejs" {
6868
interface Alpine {
6969
morph: Morph;
7070
}

types/blazor__javascript-interop/blazor__javascript-interop-tests.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ const testInteropApi = async (dotNetRef: DotNet.DotNetObject) => {
3535
DotNet.invokeMethod<string>("MyCoolApp.Core", "Foo", "First", "Second"); // $ExpectType string
3636
DotNet.invokeMethod<number>("MyCoolApp.Core", "Foo", 1, 2); // $ExpectType number
3737
const windowRef = DotNet.createJSObjectReference(window); // $ExceptType JsObjectReference
38-
DotNet.createJSStreamReference(buffer) // $ExceptType JsObjectReference
39-
DotNet.createJSStreamReference(new Int32Array(buffer)) // $ExceptType JsObjectReference
40-
DotNet.createJSStreamReference(new Blob()) // $ExceptType JsObjectReference
41-
DotNet.disposeJSObjectReference(windowRef) // $ExceptType void
38+
DotNet.createJSStreamReference(buffer); // $ExceptType JsObjectReference
39+
DotNet.createJSStreamReference(new Int32Array(buffer)); // $ExceptType JsObjectReference
40+
DotNet.createJSStreamReference(new Blob()); // $ExceptType JsObjectReference
41+
DotNet.disposeJSObjectReference(windowRef); // $ExceptType void
4242
const fooResults = await DotNet.invokeMethodAsync<string>("MyCoolApp.Core", "Foo", "First", "Second"); // $ExpectType string
4343
DotNet.invokeMethodAsync<string>("MyCoolApp.Core", "Foo", "First", "Second"); // $ExpectType Promise<string>
4444
DotNet.invokeMethodAsync<string>("MyCoolApp.Core", "Foo", "First", "Second"); // $ExpectType Promise<string>

0 commit comments

Comments
 (0)