UNPKG

@joshfarrant/shortcuts-js

Version:
36 lines (35 loc) 1.58 kB
import AggrandizementPropertyName from './WF/AggrandizementPropertyName'; import Attachment from './WF/Attachment'; import WFDateFormatStyle from './WF/WFDateFormatStyle'; import WFSerialization from './WF/WFSerialization'; import WFSerializationType from './WF/WFSerializationType'; import WFTimeFormatStyle from './WF/WFTimeFormatStyle'; declare type CoercionType = ('Anything' | 'App Store app' | 'Article' | 'Boolean' | 'Contact' | 'Date' | 'Dictionary' | 'Email address' | 'File' | 'Image' | 'iTunes media' | 'iTunes product' | 'Location' | 'Maps link' | 'Media' | 'Number' | 'PDF' | 'Phone number' | 'Photo media' | 'Place' | 'Rich text' | 'Safari web page' | 'Text' | 'URL' | 'vCard'); export default class Variable implements WFSerialization { Value: Attachment; WFSerializationType: WFSerializationType; constructor(value: Attachment); /** * Method that can be applied to variables, magic variables, global variables and local variables. * It creates an aggrandized copy of the variable, allowing for type coercion and * subproperty access. * * ```js * // clipboard contains 'Monday at seven o'clock', returns '19:00' * clipboard.with({ * type: 'Date', * dateFormat: 'Custom', * customFormat: 'HH:mm', * }); * ``` */ with(options: { type?: CoercionType; get?: AggrandizementPropertyName; dateFormat?: WFDateFormatStyle; timeFormat?: WFTimeFormatStyle; customFormat?: string; getValueForKey?: string; }): Variable; } export {};