0
Fork 0
mirror of https://github.com/penpot/penpot-plugins.git synced 2025-01-21 06:02:34 -05:00

refactor(lorem-ipsum-plugin): adapt to type refactor

This commit is contained in:
alonso.torres 2024-09-04 09:15:08 +02:00 committed by Alonso Torres
parent 23f7dd8c6d
commit f48aa68e99

View file

@ -1,4 +1,4 @@
import { PenpotText } from '@penpot/plugin-types'; import { Text } from '@penpot/plugin-types';
import type { import type {
PluginMessageEvent, PluginMessageEvent,
PluginUIEvent, PluginUIEvent,
@ -17,8 +17,8 @@ penpot.on('themechange', (theme) => {
sendMessage({ type: 'theme', content: theme }); sendMessage({ type: 'theme', content: theme });
}); });
function getSelectedShapes(): PenpotText[] { function getSelectedShapes(): Text[] {
return penpot.selection.filter((it): it is PenpotText => { return penpot.selection.filter((it): it is Text => {
return penpot.utils.types.isText(it); return penpot.utils.types.isText(it);
}); });
} }