This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert product-elements/stock-indicator to TypeScript (#7567)
* Convert product-elements/stock-indicator to TypeScript * bot: update checkstyle.xml * Add interface for blockAttributes * bot: update checkstyle.xml Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
c6c31b3
commit 04f3f4f
Showing
9 changed files
with
59 additions
and
60 deletions.
There are no files selected for viewing
8 changes: 0 additions & 8 deletions
8
assets/js/atomic/blocks/product-elements/stock-indicator/attributes.js
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
assets/js/atomic/blocks/product-elements/stock-indicator/attributes.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
interface BlockAttributes { | ||
productId: { | ||
type: string; | ||
default: number; | ||
}; | ||
} | ||
|
||
export const blockAttributes: BlockAttributes = { | ||
productId: { | ||
type: 'number', | ||
default: 0, | ||
}, | ||
}; | ||
|
||
export default blockAttributes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
assets/js/atomic/blocks/product-elements/stock-indicator/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface BlockAttributes { | ||
productId: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters