0

Hey I am new to Type script, and I am wonder how would I set ResultsPer and Entries as an array?

interface IProps {
    ResultsPer: number;
    Entries: number
}

1 Answer 1

1
interface IProps {
    ResultsPer: number[];
    Entries: number[];
}
Sign up to request clarification or add additional context in comments.

2 Comments

So then how would I pass that into this (it gives me an error) code: return <ResultsPerPage ResultsPer={"10"} Entries={"60"} />;
@blazing try: return <ResultsPerPage ResultsPer={[10]} Entries={[60]} />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.