Last active
May 18, 2021 15:05
-
-
Save ReallyBadNews/0c04a385f21999150bbcd80edb04c006 to your computer and use it in GitHub Desktop.
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
const AmpOutputType = props => { | |
... | |
}; | |
// Does not work | |
AmpOutputType.transform = { | |
amp({ data }) { | |
let newData = data; | |
// magic happens here | |
return { | |
data: newData, | |
}; | |
}, | |
}; | |
// Creates `newAmp` output type | |
AmpOutputType.transform = { | |
newAmp({ data }) { | |
let newData = data; | |
// magic happens here | |
return { | |
data: newData, | |
}; | |
}, | |
}; | |
// Does not add `amp` as a fallback to `newAmp` | |
AmpOutputType.fallback = ["amp", "default"]; | |
export default AmpOutputType; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment