About the "DBCache" class

15 views
Skip to first unread message

Yang Lei

unread,
Aug 7, 2025, 1:48:00 AMAug 7
to Tinode General
The following import statement is in the Tinode SDK source file (https://github.com/tinode/tinode-js/blob/master/src/tinode.js

import DBCache from './db.js';

but there is no DBCache class at all in the db.js (https://github.com/tinode/tinode-js/blob/master/src/db.js)

is it mistake?

Gene

unread,
Aug 7, 2025, 3:34:50 AMAug 7
to Tinode General
Yes, you don't understand the semantics of JS import statement. Please read the manual
 

Yang Lei

unread,
Aug 8, 2025, 1:43:19 AMAug 8
to Tinode General
Thank you a lot for the patient guidance.

I would argue it is really not a "good part" of Javascript or any other languages though. 

import * as newname from ,  or import thesame from , would be a lot of easier to understand. 

Reply all
Reply to author
Forward
0 new messages