triniwiz / triniwiz/nativescript-plugins

Error in extending CouchBase class @triniwiz/nativescript-couchbase

Open
#121 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
87
Forks
57
Avg merge
1h 36m
Merged PRs (30d)
4

Description

Hi,

I have a class that extends CouchBase:

import {CouchBase} from '@triniwiz/nativescript-couchbase';
import { Query} from '@triniwiz/nativescript-couchbase/common';

declare let com: any;
export class CouchbaseLite extends CouchBase
{
}
...

when I try to instantiate my parent class:

this.database = new CouchbaseLite("hello");

I will face this error:

JS: ERROR TypeError: Class constructor CouchBase cannot be invoked without 'new'

I would be more than happy if you could give me some advice.

Thank you

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CouchbaseLite class declaration and the new CouchbaseLite("hello") call, then inspect how the imported CouchBase constructor is exposed. Reproduce the error in the NativeScript Couchbase setup; done requires identifying the cause and confirming how the class can be extended and instantiated.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.