MCPcopy Create free account
hub / github.com/angular/dev-infra / callbackFor

Function callbackFor

ng-dev/format/formatters/base-formatter.ts:77–86  ·  view source on GitHub ↗

* Retrieve the callback for the provided action to determine if an action * failed in formatting.

(action: FormatterAction)

Source from the content-addressed store, hash-verified

75 * failed in formatting.
76 */
77 callbackFor(action: FormatterAction) {
78 switch (action) {
79 case 'check':
80 return this.actions.check.callback;
81 case 'format':
82 return this.actions.format.callback;
83 default:
84 throw Error('Unknown action type');
85 }
86 }
87
88 /** Whether the formatter is enabled in the provided config. */
89 isEnabled() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected