mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:50:33 +08:00
21 lines
598 B
JavaScript
Executable File
21 lines
598 B
JavaScript
Executable File
// @ts-check
|
|
|
|
import PinEntity from "../entity/PinEntity"
|
|
import Utility from "../Utility"
|
|
import GeneralSerializer from "./GeneralSerializer"
|
|
|
|
export default class PinSerializer extends GeneralSerializer {
|
|
|
|
constructor() {
|
|
super(v => `${PinEntity.lookbehind} (${v})`, PinEntity, "", ",", true)
|
|
}
|
|
|
|
writeValue(value, fullKey) {
|
|
if (value?.constructor === String && fullKey == "DefaultValue") {
|
|
// @ts-expect-error
|
|
return `"${Utility.encodeInputString(value)}"`
|
|
}
|
|
return super.writeValue(value, fullKey)
|
|
}
|
|
}
|