canvas-context
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -5,2 +5,11 @@ # Changelog | ||
## [3.0.2](https://github.com/dmnsgn/canvas-context/compare/v3.0.1...v3.0.2) (2021-04-14) | ||
### Bug Fixes | ||
* export types ([99c61bd](https://github.com/dmnsgn/canvas-context/commit/99c61bdf267b01410fd449f10c68b69196b412ed)) | ||
## [3.0.1](https://github.com/dmnsgn/canvas-context/compare/v3.0.0...v3.0.1) (2021-03-22) | ||
@@ -7,0 +16,0 @@ |
@@ -19,5 +19,5 @@ /** | ||
* @alias module:createCanvasContext | ||
* @param {ContextType} [contextType="2d"] | ||
* @param {CanvasContextOptions} [options={}] | ||
* @returns {CanvasContextReturnValue} | ||
* @param {import("./types.js").ContextType} [contextType="2d"] | ||
* @param {import("./types.js").CanvasContextOptions} [options={}] | ||
* @returns {import("./types.js").CanvasContextReturnValue} | ||
*/ | ||
@@ -24,0 +24,0 @@ function createCanvasContext(contextType = "2d", options = {}) { |
{ | ||
"name": "canvas-context", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Create a RenderingContext (2d, webgl, webgl2, bitmaprenderer, gpupresent), optionally offscreen for possible use in a Worker.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -19,1 +19,3 @@ /** | ||
*/ | ||
export {}; |
@@ -6,6 +6,6 @@ export default createCanvasContext; | ||
* @alias module:createCanvasContext | ||
* @param {ContextType} [contextType="2d"] | ||
* @param {CanvasContextOptions} [options={}] | ||
* @returns {CanvasContextReturnValue} | ||
* @param {import("./types.js").ContextType} [contextType="2d"] | ||
* @param {import("./types.js").CanvasContextOptions} [options={}] | ||
* @returns {import("./types.js").CanvasContextReturnValue} | ||
*/ | ||
declare function createCanvasContext(contextType?: ContextType, options?: CanvasContextOptions): CanvasContextReturnValue; | ||
declare function createCanvasContext(contextType?: import("./types.js").ContextType, options?: import("./types.js").CanvasContextOptions): import("./types.js").CanvasContextReturnValue; |
/** | ||
* A DOMString containing the context identifier defining the drawing context associated to the canvas. | ||
*/ | ||
type ContextType = "2d" | "webgl" | "experimental-webgl" | "webgl2" | "webgl2-compute" | "bitmaprenderer" | "gpupresent"; | ||
export type ContextType = "2d" | "webgl" | "experimental-webgl" | "webgl2" | "webgl2-compute" | "bitmaprenderer" | "gpupresent"; | ||
/** | ||
* Options for canvas creation. All optional. | ||
*/ | ||
type CanvasContextOptions = { | ||
export type CanvasContextOptions = { | ||
/** | ||
@@ -30,5 +30,5 @@ * Request an initial canvas width. | ||
}; | ||
type CanvasContextReturnValue = { | ||
export type CanvasContextReturnValue = { | ||
canvas: HTMLCanvasElement | OffscreenCanvas; | ||
context: RenderingContext; | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14000
127