Skip to content

Commit

Permalink
genesis
Browse files Browse the repository at this point in the history
  • Loading branch information
ozwaldorf committed May 28, 2024
0 parents commit 64c1c22
Show file tree
Hide file tree
Showing 13 changed files with 4,565 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Github Pages

on:
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate docs
run: |
cat dts/* > index.d.ts
deno doc --html index.d.ts
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: 'docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
docs/
index.d.ts

8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Fleek Functions Runtime Declarations

Re-render docs:

```bash
cat dts/* > index.d.ts
deno doc --html index.d.ts
```
87 changes: 87 additions & 0 deletions dts/lib.deno_canvas.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

// deno-lint-ignore-file no-var

/// <reference no-default-lib="true" />
/// <reference lib="esnext" />

/** @category Web APIs */
declare type PredefinedColorSpace = "srgb" | "display-p3";

/** @category Web APIs */
declare interface ImageDataSettings {
readonly colorSpace?: PredefinedColorSpace;
}

/** @category Web APIs */
declare interface ImageData {
readonly colorSpace: PredefinedColorSpace;
readonly data: Uint8ClampedArray;
readonly height: number;
readonly width: number;
}

/** @category Web APIs */
declare var ImageData: {
prototype: ImageData;
new (sw: number, sh: number, settings?: ImageDataSettings): ImageData;
new (
data: Uint8ClampedArray,
sw: number,
sh?: number,
settings?: ImageDataSettings,
): ImageData;
};

/** @category Web APIs */
declare type ColorSpaceConversion = "default" | "none";

/** @category Web APIs */
declare type ImageOrientation = "flipY" | "from-image" | "none";

/** @category Web APIs */
declare type PremultiplyAlpha = "default" | "none" | "premultiply";

/** @category Web APIs */
declare type ResizeQuality = "high" | "low" | "medium" | "pixelated";

/** @category Web APIs */
declare type ImageBitmapSource = Blob | ImageData;

/** @category Web APIs */
interface ImageBitmapOptions {
colorSpaceConversion?: ColorSpaceConversion;
imageOrientation?: ImageOrientation;
premultiplyAlpha?: PremultiplyAlpha;
resizeHeight?: number;
resizeQuality?: ResizeQuality;
resizeWidth?: number;
}

/** @category Web APIs */
declare function createImageBitmap(
image: ImageBitmapSource,
options?: ImageBitmapOptions,
): Promise<ImageBitmap>;
/** @category Web APIs */
declare function createImageBitmap(
image: ImageBitmapSource,
sx: number,
sy: number,
sw: number,
sh: number,
options?: ImageBitmapOptions,
): Promise<ImageBitmap>;

/** @category Web APIs */
interface ImageBitmap {
readonly height: number;
readonly width: number;
close(): void;
}

/** @category Web APIs */
declare var ImageBitmap: {
prototype: ImageBitmap;
new (): ImageBitmap;
};
41 changes: 41 additions & 0 deletions dts/lib.deno_console.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

// deno-lint-ignore-file no-explicit-any

/// <reference no-default-lib="true" />
/// <reference lib="esnext" />

/** @category Console and Debugging */
declare interface Console {
assert(condition?: boolean, ...data: any[]): void;
clear(): void;
count(label?: string): void;
countReset(label?: string): void;
debug(...data: any[]): void;
dir(item?: any, options?: any): void;
dirxml(...data: any[]): void;
error(...data: any[]): void;
group(...data: any[]): void;
groupCollapsed(...data: any[]): void;
groupEnd(): void;
info(...data: any[]): void;
log(...data: any[]): void;
table(tabularData?: any, properties?: string[]): void;
time(label?: string): void;
timeEnd(label?: string): void;
timeLog(label?: string, ...data: any[]): void;
trace(...data: any[]): void;
warn(...data: any[]): void;

/** This method is a noop, unless used in inspector */
timeStamp(label?: string): void;

/** This method is a noop, unless used in inspector */
profile(label?: string): void;

/** This method is a noop, unless used in inspector */
profileEnd(label?: string): void;
}

/** @category Web APIs */
declare var console: Console;
Loading

0 comments on commit 64c1c22

Please sign in to comment.