Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I've got a working SharePoint App that I need to read from an Azure Service Bus queue. I read that the best way to do this is with Node.js. I'm trying to do this with the Typescript definitely typed definitions from NuGet and installed the node.definitelytyped files no problem and it's installed in my App the following files

node-0.10.d.ts
node-0.11.d.ts
node-0.12.d.ts
node-0.8.8.d.ts
node-4.d.ts
node.d.ts

Compiling at this point gave me 2128 errors most of which are about duplicates
I've removed the following files which looked like previous versions

node-0.10.d.ts
node-0.11.d.ts
node-0.12.d.ts
node-0.8.8.d.ts
node-4.d.ts

But I've left 'node.d.ts' which has reduced the error list down from 2128 to the following 2 errors

1) Class 'AssertionError' incorrectly implements interface 'Error'. Property 'popStackFrame' is missing in type 'AssertionError'. node.d.ts

2) Build: Class 'AssertionError' incorrectly implements interface 'Error'. node.d.ts


I've updated the Typescript extension in Visual Studio 2013 with the 'Extensions and Updates' to version 1.8 but this hasn't helped

Can anyone point me to a resolution to these last 2 errors?

What I have tried:

Updating Typescript extension for Visual Studio. Installing latest version of NPM and getting the definition files again.
Posted
Updated 25-Jul-16 23:51pm

1 solution

Ok so the error is telling me that the property for 'popStackFrame' is missing from the 'AssertionError' class. Here is the class definition:

C#
export class AssertionError implements Error {
    name: string;
    message: string;
    actual: any;
    expected: any;
    operator: string;
    generatedMessage: boolean;

    constructor(options?: {
        message?: string; actual?: any; expected?: any;
        operator?: string; stackStartFunction?: Function
    });
}


So I've altered the class to look like this with the extra line

C#
export class AssertionError implements Error {
    name: string;
    message: string;
    actual: any;
    expected: any;
    operator: string;
    generatedMessage: boolean;
    popStackFrame: any;

    constructor(options?: {
        message?: string; actual?: any; expected?: any;
        operator?: string; stackStartFunction?: Function
    });
}


The code now compiles ok.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900