You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.error('`displayObjectSize` is deprecated. Use `displaySize` instead.\nSee https://viewer.textea.io/migration/migration-v3#raname-displayobjectsize-to-displaysize for more information.')
console.warn('createDataType is deprecated, please use `defineDataType` instead')
134
+
console.warn('createDataType is deprecated, please use `defineDataType` instead. See https://viewer.textea.io/migration/migration-v3#use-definedatatype-instead-of-createdatatype for more information.')
123
135
}
124
136
return{
125
137
is,
@@ -139,6 +151,9 @@ export function defineDataType<ValueType = unknown> ({
139
151
PreComponent,
140
152
PostComponent
141
153
}: {
154
+
/**
155
+
* Type matcher - Whether the value belongs to the data type
156
+
*/
142
157
is: (value: unknown,path: Path)=>boolean
143
158
/**
144
159
* transform the value to a string for editing
@@ -151,6 +166,12 @@ export function defineDataType<ValueType = unknown> ({
0 commit comments