0

I declared the following:

ExamTypeId = {
    All: {
        id: this.examTypeSelectId,
        text: 'Exam Type: All',
        val: 0
    }
}

and an interface:

export interface IEnumElement {
    id: string;
    text: string;
    val: number
}

A function that I call:

checkGrid(expectedCount: number, row: string, params: IEnumElement[]) {
    ...
    ...
}

Now I am trying to call my function like this:

page.checkGrid(4, page.gridRow,  [page.ExamStatusId.All, page.ExamTypeId.All]);

It is giving me a java exception error which I think is related to the way I am calling the function. Can someone confirm if this is the correct way to set the type for an array of IEnumElement?

1
  • You get a runtime error right? Or an error during the compilation process? Commented Jul 17, 2014 at 12:34

1 Answer 1

1

In the code you have supplied, you have used:

page.ExamStatusId.All

But ExamStatusId isn't defined anywhere... did you mean to use ExamTypeId?

In any case, if there is an ExamStatusId property, it would also have to contain an All element that has the same structure as IEnumElement.

If the error is at runtime, make sure you have included all of the JavaScript files at runtime (all the files, all with a .js extension and in the right order!)

If you are still stuck, can you share the error message?

Sign up to request clarification or add additional context in comments.

Comments

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.