Skip to content

Commit

Permalink
feat(@angular-devkit/schematics): remove deprecated isAction
Browse files Browse the repository at this point in the history
BREAKING CHANGE:

`isAction` has been removed without replacement as it was unused.
  • Loading branch information
alan-agius4 committed Aug 10, 2021
1 parent 36e53c0 commit 8954d11
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
3 changes: 0 additions & 3 deletions goldens/public-api/angular_devkit/schematics/src/index.md
Expand Up @@ -588,9 +588,6 @@ export class InvalidUpdateRecordException extends BaseException {
constructor();
}

// @public @deprecated (undocumented)
export function isAction(action: any): action is Action;

// @public (undocumented)
export function isContentAction(action: Action): action is CreateFileAction | OverwriteFileAction;

Expand Down
15 changes: 0 additions & 15 deletions packages/angular_devkit/schematics/src/tree/action.ts
Expand Up @@ -158,21 +158,6 @@ export function isContentAction(action: Action): action is CreateFileAction | Ov
return action.kind == 'c' || action.kind == 'o';
}

/**
* @deprecated since version 11.0. not used anymore can be removed in future version.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function isAction(action: any): action is Action {
const kind = action && action.kind;

return (
action !== null &&
typeof action.id == 'number' &&
typeof action.path == 'string' &&
(kind == 'c' || kind == 'o' || kind == 'r' || kind == 'd')
);
}

// Create a file. If the file already exists then this is an error.
export interface CreateFileAction extends ActionBase {
readonly kind: 'c';
Expand Down

0 comments on commit 8954d11

Please sign in to comment.