How can I convert the code from Javascript to typescript
const ORIENTATIONS = {
single: () => 0,
'right angled': (tag) => {
return hashWithinRange(tag.text) * 90;
},
multiple: (tag) => {
return hashWithinRange(tag.text) * 15 - 90;
},
};
And I'm getting this error:
const ORIENTATIONS: {
single: () => number;
'right angled': (tag: any) => number;
multiple: (tag: any) => number;
}
Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ single: () => number; 'right angled': (tag: any) => number; multiple: (tag: any) => number; }'. No index signature with a parameter of type 'string' was found on type '{ single: () => number; 'right angled': (tag: any) => number; multiple: (tag: any) => number; }'.ts(7053)