mirror of
https://github.com/cupcakearmy/svelte-cloudinary.git
synced 2025-09-06 01:20:40 +00:00
docs
This commit is contained in:
14
src/index.ts
14
src/index.ts
@@ -1,9 +1,9 @@
|
||||
import { Cloudinary, Configuration, Transformation } from 'cloudinary-core'
|
||||
|
||||
type ElementOrString = Element | string
|
||||
type Size = { width: number; height: number }
|
||||
type BindType = ElementOrString | true
|
||||
type BindObject = BindType | { width?: BindType; height?: BindType }
|
||||
export type ElementOrString = Element | string
|
||||
export type Size = { width: number; height: number }
|
||||
export type BindType = ElementOrString | true
|
||||
export type BindObject = BindType | { width?: BindType; height?: BindType }
|
||||
|
||||
export type InitParameters = { debug?: boolean }
|
||||
export type ImageParameters = {
|
||||
@@ -21,9 +21,9 @@ function log(...msg: any[]) {
|
||||
if (DEBUG) console.debug(...msg)
|
||||
}
|
||||
|
||||
export function initialize(options: Configuration.Options, { debug }: InitParameters = {}) {
|
||||
DEBUG = debug || false
|
||||
cl = Cloudinary.new(options)
|
||||
export function initialize(cloudinary: Configuration.Options, options: InitParameters = {}) {
|
||||
DEBUG = options.debug || false
|
||||
cl = Cloudinary.new(cloudinary)
|
||||
}
|
||||
|
||||
const defaults: Transformation | Transformation.Options = {
|
||||
|
Reference in New Issue
Block a user