UNPKG

1.57 kBTypeScriptView Raw
1import { IResolvable, IResolveContext } from '../resolvable';
2/**
3 * Customization properties for an Intrinsic token
4 *
5 */
6export interface IntrinsicProps {
7 /**
8 * Capture the stack trace of where this token is created
9 *
10 * @default true
11 */
12 readonly stackTrace?: boolean;
13}
14/**
15 * Token subclass that represents values intrinsic to the target document language
16 *
17 * WARNING: this class should not be externally exposed, but is currently visible
18 * because of a limitation of jsii (https://github.com/aws/jsii/issues/524).
19 *
20 * This class will disappear in a future release and should not be used.
21 *
22 */
23export declare class Intrinsic implements IResolvable {
24 /**
25 * The captured stack trace which represents the location in which this token was created.
26 */
27 readonly creationStack: string[];
28 private readonly value;
29 constructor(value: any, options?: IntrinsicProps);
30 resolve(_context: IResolveContext): any;
31 /**
32 * Convert an instance of this Token to a string
33 *
34 * This method will be called implicitly by language runtimes if the object
35 * is embedded into a string. We treat it the same as an explicit
36 * stringification.
37 */
38 toString(): string;
39 /**
40 * Turn this Token into JSON
41 *
42 * Called automatically when JSON.stringify() is called on a Token.
43 */
44 toJSON(): any;
45 /**
46 * Creates a throwable Error object that contains the token creation stack trace.
47 * @param message Error message
48 */
49 protected newError(message: string): any;
50}