Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript errors in master branch #677

Open
tsukkiren opened this issue Jul 27, 2024 · 1 comment · May be fixed by #695
Open

TypeScript errors in master branch #677

tsukkiren opened this issue Jul 27, 2024 · 1 comment · May be fixed by #695
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@tsukkiren
Copy link

tsukkiren commented Jul 27, 2024

json-joy % npx tsc                                                      
src/json-crdt-extensions/cnt/__demos__/docs.ts:10:9 - error TS2305: Module '".."' has no exported member 'CntExt'.

10 import {CntExt} from '..';
           ~~~~~~

src/json-crdt-extensions/cnt/__demos__/docs.ts:32:5 - error TS2339: Property 'inc' does not exist on type 'ExtApi<ExtNode<any, any>>'.

32 api.inc(10);
       ~~~

src/json-crdt-extensions/cnt/__demos__/usage.ts:10:9 - error TS2305: Module '".."' has no exported member 'CntExt'.

10 import {CntExt} from '..';
           ~~~~~~

src/json-crdt-extensions/cnt/__demos__/usage.ts:28:5 - error TS2339: Property 'inc' does not exist on type 'ExtApi<ExtNode<any, any>>'.

28 api.inc(10);
       ~~~

src/json-crdt-extensions/mval/__demos__/docs.ts:10:9 - error TS2305: Module '".."' has no exported member 'MvalExt'.

10 import {MvalExt} from '..';
           ~~~~~~~

src/json-crdt-extensions/mval/__demos__/docs.ts:28:5 - error TS2339: Property 'set' does not exist on type 'ExtApi<ExtNode<any, any>>'.

28 api.set(s.con(2));
       ~~~

src/json-crdt-extensions/mval/__demos__/usage.ts:10:9 - error TS2305: Module '".."' has no exported member 'MvalExt'.

10 import {MvalExt} from '..';
           ~~~~~~~

src/json-crdt-extensions/mval/__demos__/usage.ts:31:5 - error TS2339: Property 'set' does not exist on type 'ExtApi<ExtNode<any, any>>'.

31 api.set(s.con(5));
       ~~~

src/json-crdt-extensions/mval/__demos__/usage.ts:41:5 - error TS2339: Property 'set' does not exist on type 'ExtApi<ExtNode<any, any>>'.

41 api.set(s.con(10));
       ~~~

src/json-crdt-extensions/mval/__demos__/usage.ts:42:6 - error TS2339: Property 'set' does not exist on type 'ExtApi<ExtNode<any, any>>'.

42 api2.set(s.con(20));
        ~~~

src/json-crdt-extensions/mval/__demos__/view.ts:10:9 - error TS2305: Module '".."' has no exported member 'MvalExt'.

10 import {MvalExt} from '..';
           ~~~~~~~

src/json-crdt/__bench__/util/editors/index.ts:2:19 - error TS2307: Cannot find module 'diamond-types-node' or its corresponding type declarations.

2 import {Doc} from 'diamond-types-node';
                    ~~~~~~~~~~~~~~~~~~~~

src/json-crdt/__bench__/util/editors/index.ts:4:17 - error TS2307: Cannot find module 'ywasm' or its corresponding type declarations.

4 import Yrs from 'ywasm';
                  ~~~~~~~

src/json-crdt/__bench__/util/editors/index.ts:5:28 - error TS2307: Cannot find module '@automerge/automerge' or its corresponding type declarations.

5 import * as Automerge from '@automerge/automerge';
                             ~~~~~~~~~~~~~~~~~~~~~~

src/json-crdt/__bench__/util/editors/index.ts:6:31 - error TS2307: Cannot find module '@collabs/collabs' or its corresponding type declarations.

6 import {CRuntime, CText} from '@collabs/collabs';
                                ~~~~~~~~~~~~~~~~~~

src/json-crdt/__bench__/util/editors/index.ts:7:20 - error TS2307: Cannot find module 'loro-crdt' or its corresponding type declarations.

7 import {Loro} from 'loro-crdt';
                     ~~~~~~~~~~~

src/json-crdt/__bench__/util/editors/index.ts:63:34 - error TS7006: Parameter 'doc' implicitly has an 'any' type.

63     doc = Automerge.change(doc, (doc) => {
                                    ~~~

src/json-crdt/__bench__/util/editors/index.ts:68:38 - error TS7006: Parameter 'doc' implicitly has an 'any' type.

68         doc = Automerge.change(doc, (doc) => {
                                        ~~~

src/json-crdt/__bench__/util/editors/index.ts:73:38 - error TS7006: Parameter 'doc' implicitly has an 'any' type.

73         doc = Automerge.change(doc, (doc) => {
                                        ~~~

src/json-crdt/__bench__/util/editors/index.ts:89:53 - error TS7006: Parameter 'init' implicitly has an 'any' type.

89     const text: CText = doc.registerCollab('text', (init) => new CText(init));
                                                       ~~~~

src/json-crdt/__bench__/util/structural-editors.ts:3:22 - error TS2307: Cannot find module 'ywasm' or its corresponding type declarations.

3 import * as Yrs from 'ywasm';
                       ~~~~~~~

src/json-crdt/__bench__/util/structural-editors.ts:4:28 - error TS2307: Cannot find module '@automerge/automerge' or its corresponding type declarations.

4 import * as Automerge from '@automerge/automerge';
                             ~~~~~~~~~~~~~~~~~~~~~~

src/json-crdt/__demos__/events-level2-arr.ts:72:6 - error TS2339: Property 'ins' does not exist on type 'void'.

72     .ins(1, [konst(2)]);
        ~~~

src/json-crdt/__demos__/toString-array.ts:28:19 - error TS2339: Property 'ins' does not exist on type 'void'.

28 str.ins(3, 'def').ins(6, 'ghi').del(1, 2);
                     ~~~

src/json-crdt/__demos__/toString-object.ts:64:4 - error TS2339: Property 'val' does not exist on type 'void'.

64   .val(['age'])
      ~~~

src/json-crdt/__demos__/toString-object.ts:72:35 - error TS2339: Property 'ins' does not exist on type 'void'.

72 model.api.str(['name']).del(7, 3).ins(7, 'Bravo!').ins(0, '💪 ');
                                     ~~~

src/json-crdt/__demos__/toString-string.ts:34:29 - error TS2339: Property 'ins' does not exist on type 'void'.

34 str.api.str([]).ins(2, 'l').ins(10, '!');
                               ~~~

src/json-expression/__bench__/main.ts:53:9 - error TS2740: Type 'Vars' is missing the following properties from type 'Map<string, unknown>': clear, delete, forEach, size, and 5 more.

53     fn({vars: new Vars(json)});
           ~~~~

  src/json-expression/Vars.ts:4:22
    4   protected readonly vars: Map<string, unknown> = new Map();
                           ~~~~
    The expected type comes from property 'vars' which is declared here on type 'Vars'

src/json-expression/__bench__/main.ts:58:9 - error TS2322: Type 'Vars' is not assignable to type 'Map<string, unknown>'.

58     fn({vars: new Vars(json)});
           ~~~~

  src/json-expression/Vars.ts:4:22
    4   protected readonly vars: Map<string, unknown> = new Map();
                           ~~~~
    The expected type comes from property 'vars' which is declared here on type 'Vars'


Found 29 errors in 12 files.

Errors  Files
     2  src/json-crdt-extensions/cnt/__demos__/docs.ts:10
     2  src/json-crdt-extensions/cnt/__demos__/usage.ts:10
     2  src/json-crdt-extensions/mval/__demos__/docs.ts:10
     4  src/json-crdt-extensions/mval/__demos__/usage.ts:10
     1  src/json-crdt-extensions/mval/__demos__/view.ts:10
     9  src/json-crdt/__bench__/util/editors/index.ts:2
     2  src/json-crdt/__bench__/util/structural-editors.ts:3
     1  src/json-crdt/__demos__/events-level2-arr.ts:72
     1  src/json-crdt/__demos__/toString-array.ts:28
     2  src/json-crdt/__demos__/toString-object.ts:64
     1  src/json-crdt/__demos__/toString-string.ts:34
     2  src/json-expression/__bench__/main.ts:53
@streamich streamich added help wanted Extra attention is needed good first issue Good for newcomers labels Jul 28, 2024
@alienkarma alienkarma linked a pull request Aug 24, 2024 that will close this issue
@alienkarma
Copy link

#695 Types based bug fixes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants