Вы можете использовать typeof
для повторного использования типа:
export class SendingStates {
public static sendingStates: 'waiting' | 'sending' | 'sent' | 'error' | 'input-error'
}
interface IProps {
sendingState: typeof SendingStates.sendingStates
}
Или вы можете создать псевдоним типа:
type sendingStateType = 'waiting' | 'sending' | 'sent' | 'error' | 'input-error'
export class SendingStates {
public static sendingStates: sendingStateType
}
interface IProps {
sendingState: sendingStateType
}