diff options
| author | bobzel <zzzman@gmail.com> | 2025-02-26 20:48:51 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2025-02-26 20:48:51 -0500 |
| commit | a9a1a6a507616a77f70d6525dab5027f5b7a60e6 (patch) | |
| tree | 97a37fdcdfed7bb2f0635b88b543ad525b58de14 /src/client/views/smartdraw/FireflyConstants.ts | |
| parent | fa8122df7467af3d4410b7daf1cd75227a53fd96 (diff) | |
added typing to PostToServer calls. made smartDraw popup create images locally.
Diffstat (limited to 'src/client/views/smartdraw/FireflyConstants.ts')
| -rw-r--r-- | src/client/views/smartdraw/FireflyConstants.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/views/smartdraw/FireflyConstants.ts b/src/client/views/smartdraw/FireflyConstants.ts index 1f1781617..8cc9e36a5 100644 --- a/src/client/views/smartdraw/FireflyConstants.ts +++ b/src/client/views/smartdraw/FireflyConstants.ts @@ -5,6 +5,11 @@ export interface FireflyImageData { href?: string; } +export function isFireflyImageData(obj: unknown): obj is FireflyImageData { + const tobj = obj as FireflyImageData; + return typeof obj === 'object' && obj !== null && typeof tobj.pathname === 'string' && typeof tobj.prompt === 'string' && typeof tobj.seed === 'number'; +} + export enum FireflyImageDimensions { Square = 'square', Landscape = 'landscape', |
