Skip to content

Commit

Permalink
run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
jjspace committed Jan 17, 2025
1 parent bc54750 commit d6fc955
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 35 deletions.
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@
**/*.min.js

packages/engine/Build/**
packages/engine/types/**
packages/engine/index.js
packages/engine/Source/Scene/GltfPipeline/**
packages/engine/Source/Shaders/**/*.js
packages/engine/Source/ThirdParty/**

packages/widgets/Build/**
packages/widgets/types/**
packages/widgets/index.js
packages/widgets/Source/ThirdParty/**

Expand Down
2 changes: 1 addition & 1 deletion Source/Cesium.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "./Cesium.js";
export * from "./Cesium.js";
1 change: 0 additions & 1 deletion Tools/jsdoc/cesium_template/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,6 @@ exports.publish = function (taffyData, opts, tutorials) {
var namespaces = taffy(members.namespaces);
var globals = taffy(members.globals);

console.log("interfaces", interfaces);
var typesJson = {};

Object.keys(helper.longnameToUrl).forEach(function (longname) {
Expand Down
12 changes: 10 additions & 2 deletions packages/engine/Specs/types/Core/Check.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,21 @@ Check.typeOf.number.lessThan("lessThan", myNumberLessThan, 100);
expectAssignable<number>(myNumberLessThan);

let myNumberLessThanEquals: string | number | undefined;
Check.typeOf.number.lessThanOrEquals("lessThanEquals", myNumberLessThanEquals, 100);
Check.typeOf.number.lessThanOrEquals(
"lessThanEquals",
myNumberLessThanEquals,
100,
);
expectAssignable<number>(myNumberLessThanEquals);

let myNumberGreaterThan: string | number | undefined;
Check.typeOf.number.greaterThan("greaterThan", myNumberGreaterThan, 100);
expectAssignable<number>(myNumberGreaterThan);

let myNumberGreaterThanEquals: string | number | undefined;
Check.typeOf.number.greaterThanOrEquals("greaterThanEquals", myNumberGreaterThanEquals, 100);
Check.typeOf.number.greaterThanOrEquals(
"greaterThanEquals",
myNumberGreaterThanEquals,
100,
);
expectAssignable<number>(myNumberGreaterThanEquals);
12 changes: 10 additions & 2 deletions packages/engine/Specs/types/Core/TerrainProvider.test-d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
import { expectAssignable } from "tsd";

import { ArcGISTiledElevationTerrainProvider, CesiumTerrainProvider, EllipsoidTerrainProvider, GoogleEarthEnterpriseTerrainProvider, Terrain, TerrainProvider, VRTheWorldTerrainProvider } from "@cesium/engine";
import {
ArcGISTiledElevationTerrainProvider,
CesiumTerrainProvider,
EllipsoidTerrainProvider,
GoogleEarthEnterpriseTerrainProvider,
Terrain,
TerrainProvider,
VRTheWorldTerrainProvider,
} from "@cesium/engine";

// Verify TerrainProvider instances conform to the expected interface
expectAssignable<TerrainProvider>(new ArcGISTiledElevationTerrainProvider());
expectAssignable<TerrainProvider>(new CesiumTerrainProvider());
expectAssignable<TerrainProvider>(new EllipsoidTerrainProvider());
expectAssignable<TerrainProvider>(new VRTheWorldTerrainProvider());
expectAssignable<TerrainProvider>(new GoogleEarthEnterpriseTerrainProvider());
expectAssignable<TerrainProvider>(new GoogleEarthEnterpriseTerrainProvider());
80 changes: 57 additions & 23 deletions packages/engine/Specs/types/Scene/ImageryProvider.test-d.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,68 @@
import { expectAssignable } from "tsd";
import { ArcGisMapServerImageryProvider, BingMapsImageryProvider, Color, GoogleEarthEnterpriseImageryProvider, GoogleEarthEnterpriseMapsProvider, GridImageryProvider, ImageryProvider, IonImageryProvider, MapboxImageryProvider, MapboxStyleImageryProvider, OpenStreetMapImageryProvider, SingleTileImageryProvider, TileCoordinatesImageryProvider, TileMapServiceImageryProvider, UrlTemplateImageryProvider, WebMapServiceImageryProvider, WebMapTileServiceImageryProvider } from "@cesium/engine"
import {
ArcGisMapServerImageryProvider,
BingMapsImageryProvider,
Color,
GoogleEarthEnterpriseImageryProvider,
GoogleEarthEnterpriseMapsProvider,
GridImageryProvider,
ImageryProvider,
IonImageryProvider,
MapboxImageryProvider,
MapboxStyleImageryProvider,
OpenStreetMapImageryProvider,
SingleTileImageryProvider,
TileCoordinatesImageryProvider,
TileMapServiceImageryProvider,
UrlTemplateImageryProvider,
WebMapServiceImageryProvider,
WebMapTileServiceImageryProvider,
} from "@cesium/engine";

// Verify ImageryProvider instances conform to the expected interface
expectAssignable<ImageryProvider>(new WebMapServiceImageryProvider({ url: "", layers: "0" }));
expectAssignable<ImageryProvider>(
new WebMapServiceImageryProvider({ url: "", layers: "0" }),
);
expectAssignable<ImageryProvider>(new ArcGisMapServerImageryProvider());
expectAssignable<ImageryProvider>(new BingMapsImageryProvider({ key: "" }));
expectAssignable<ImageryProvider>(new OpenStreetMapImageryProvider({ url: "" }));
expectAssignable<ImageryProvider>(
new OpenStreetMapImageryProvider({ url: "" }),
);
expectAssignable<ImageryProvider>(new TileMapServiceImageryProvider());
expectAssignable<ImageryProvider>(new GridImageryProvider({
tileWidth: 256,
tileHeight: 256,
color: new Color(1.0, 1.0, 1.0, 0.4),
}));
expectAssignable<ImageryProvider>(
new GridImageryProvider({
tileWidth: 256,
tileHeight: 256,
color: new Color(1.0, 1.0, 1.0, 0.4),
}),
);
expectAssignable<ImageryProvider>(new IonImageryProvider());
expectAssignable<ImageryProvider>(new MapboxImageryProvider({ mapId: "", accessToken: "" }));
expectAssignable<ImageryProvider>(new MapboxStyleImageryProvider({
styleId: "",
accessToken: "",
}));
expectAssignable<ImageryProvider>(
new MapboxImageryProvider({ mapId: "", accessToken: "" }),
);
expectAssignable<ImageryProvider>(
new MapboxStyleImageryProvider({
styleId: "",
accessToken: "",
}),
);
expectAssignable<ImageryProvider>(new SingleTileImageryProvider({ url: "" }));
expectAssignable<ImageryProvider>(new TileCoordinatesImageryProvider());
expectAssignable<ImageryProvider>(new UrlTemplateImageryProvider({ url: "" }));
expectAssignable<ImageryProvider>(new WebMapServiceImageryProvider({ url: "", layers: "" }));
expectAssignable<ImageryProvider>(
new WebMapServiceImageryProvider({ url: "", layers: "" }),
);
expectAssignable<ImageryProvider>(new GoogleEarthEnterpriseImageryProvider());
expectAssignable<ImageryProvider>(new GoogleEarthEnterpriseMapsProvider({
channel: 1,
}));
expectAssignable<ImageryProvider>(new WebMapTileServiceImageryProvider({
url: "",
layer: "",
style: "",
tileMatrixSetID: "",
}));
expectAssignable<ImageryProvider>(
new GoogleEarthEnterpriseMapsProvider({
channel: 1,
}),
);
expectAssignable<ImageryProvider>(
new WebMapTileServiceImageryProvider({
url: "",
layer: "",
style: "",
tileMatrixSetID: "",
}),
);
2 changes: 1 addition & 1 deletion packages/engine/engine.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "./index.js";
export * from "./index.js";
6 changes: 2 additions & 4 deletions packages/widgets/Specs/types/index.test-d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { expectType } from "tsd";

import {
Viewer
} from "@cesium/widgets";
import { Viewer } from "@cesium/widgets";

expectType<Viewer>(new Viewer("test"));
expectType<Viewer>(new Viewer("test"));
2 changes: 1 addition & 1 deletion packages/widgets/widgets.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "./index.js";
export * from "./index.js";

0 comments on commit d6fc955

Please sign in to comment.