This is how I implement styling in my Vue TypeScript project.
private styleTableObject: CSSStyleSheet = {
width: '100%',
height: '76%'
}
I am being forced to use the any
type.
private styleTableObject: any = {
width: '100%',
height: '76%'
}
Error messages:
Type '{ width: string; height: string; }' is not compatible with type 'CSSStyleSheet'.
Object literals can only specify known properties, and 'width' does not exist in type 'CSSStyleSheet'.
If I use any type suggested by Visual Studio Code, I receive the following error messages:
Type '{ width: string; height: string; }' is not compatible with type 'StyleSheet'.
Object literals can only specify known properties, and 'width' does not exist in type 'StyleSheet'.
219:13 Type '{ width: string; height: string; }' is missing required properties such as alignContent, alignItems, alignSelf, alignmentBaseline, and more.