Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/framework / src / globals.d.ts
Size: Mime:
import { Serializable } from '@skava/modules/___dist/exotic/typings'

declare module '@skava/modules/___dist/identifier' {
  function toComponentName(any): string
}

declare module '@skava/modules/___dist/persistance' {
  interface OneStorage<T> extends LocalStorage {
    isSupported: boolean
    getItem: (key: string) => Promise<T> | T
    setItem: (key: string, data: T) => Promise<void> | void
    removeItem: (key: string) => Promise<void> | void

    /**
     * Check if localStorage has an Item / exists with the give key
     * @param key the key of the Item
     */
    has(key: string): boolean
    hasItem(key: string): boolean
    /**
     * auto rehydrates/parses
     */
    get(key: string): Serializable
    getItem(key: string): Serializable
    /**
     * auto serializes/stringifies
     */
    set(key: string, value: Serializable): this
    setItem(key: string, value: Serializable): this
    /**
     * @alias delete
     */
    remove(key: string): boolean
    removeItem(key: string): boolean
    delete(key: string): boolean
    deleteItem(key: string): boolean

    /**
     * checks the save timeout / autoclear
     */
    hasValid(): boolean
    isPrivateBrowser(): boolean

    /**
     * @inheritDoc
     */
    clear(): boolean
  }

  declare var oneStorage = typeof OneStorage
  declare var omniStorage = typeof OneStorage
}

declare global {
  interface GLOBAL_REACT_VERSION {
    message: string
    version: string
    versions: {
      [key: string]: string
    }
  }

  interface Window {
    __ROUTER_STATE__: string
    __APOLLO_STATE__: string | NormalizedCacheObject
    skreact: GLOBAL_REACT_VERSION
  }
  interface Global {
    __ROUTER_STATE__: string
    __APOLLO_STATE__: string | NormalizedCacheObject
    skreact: GLOBAL_REACT_VERSION
  }
}

interface GLOBAL_REACT_VERSION {
  message: string
  version: string
  versions: {
    [key: string]: string
  }
}
interface Window {
  __ROUTER_STATE__: string
  __APOLLO_STATE__: string | NormalizedCacheObject
  skreact: GLOBAL_REACT_VERSION
}
interface Global {
  __ROUTER_STATE__: string
  __APOLLO_STATE__: string | NormalizedCacheObject
  skreact: GLOBAL_REACT_VERSION
}