@7h3laughingman/foundry-helpers 13.351.3 → 13.351.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,13 @@
1
+ type PlaceableObjectMap = {
2
+ AmbientLight: typeof foundry.canvas.placeables.AmbientLight;
3
+ AmbientSound: typeof foundry.canvas.placeables.AmbientSound;
4
+ Drawing: typeof foundry.canvas.placeables.Drawing;
5
+ MeasuredTemplate: typeof foundry.canvas.placeables.MeasuredTemplate;
6
+ Note: typeof foundry.canvas.placeables.Note;
7
+ Region: typeof foundry.canvas.placeables.Region;
8
+ Tile: typeof foundry.canvas.placeables.Tile;
9
+ Token: typeof foundry.canvas.placeables.Token;
10
+ Wall: typeof foundry.canvas.placeables.Wall;
11
+ };
12
+ export declare function isPlaceableObject<K extends keyof PlaceableObjectMap>(value: unknown, type: K): value is PlaceableObjectMap[K];
13
+ export {};
@@ -0,0 +1,4 @@
1
+ export function isPlaceableObject(value, type) {
2
+ return (value instanceof foundry.canvas.placeables.PlaceableObject &&
3
+ value.constructor.embeddedName === type);
4
+ }
@@ -0,0 +1 @@
1
+ export declare function isDocumentType<K extends keyof DocumentTypeMap>(value: unknown, name: K): value is DocumentTypeMap[K];
@@ -0,0 +1,3 @@
1
+ export function isDocumentType(value, name) {
2
+ return value instanceof getDocumentClass(name);
3
+ }
@@ -1,5 +1,7 @@
1
1
  export * from "./array.js";
2
+ export * from "./canvas.js";
2
3
  export * from "./compendium-collection.js";
4
+ export * from "./document.js";
3
5
  export * from "./flags.js";
4
6
  export * from "./html.js";
5
7
  export * from "./localize.js";
@@ -1,5 +1,7 @@
1
1
  export * from "./array.js";
2
+ export * from "./canvas.js";
2
3
  export * from "./compendium-collection.js";
4
+ export * from "./document.js";
3
5
  export * from "./flags.js";
4
6
  export * from "./html.js";
5
7
  export * from "./localize.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@7h3laughingman/foundry-helpers",
3
- "version": "13.351.3",
3
+ "version": "13.351.4",
4
4
  "description": "Basic helpers used for developing modules for Foundry VTT",
5
5
  "homepage": "https://github.com/7H3LaughingMan/foundry-helpers#readme",
6
6
  "bugs": {