forked from angular/components
-
Notifications
You must be signed in to change notification settings - Fork 9
/
tokens.ts
31 lines (26 loc) · 1016 Bytes
/
tokens.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {InjectionToken} from '@angular/core';
/**
* Used to provide a table to some of the sub-components without causing a circular dependency.
* @docs-private
*/
export const CDK_TABLE = new InjectionToken<any>('CDK_TABLE');
/** Configurable options for `CdkTextColumn`. */
export interface TextColumnOptions<T> {
/**
* Default function that provides the header text based on the column name if a header
* text is not provided.
*/
defaultHeaderTextTransform?: (name: string) => string;
/** Default data accessor to use if one is not provided. */
defaultDataAccessor?: (data: T, name: string) => string;
}
/** Injection token that can be used to specify the text column options. */
export const TEXT_COLUMN_OPTIONS =
new InjectionToken<TextColumnOptions<any>>('text-column-options');