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

npm:@toi/[email protected] import missing properties #27898

Open
dsherret opened this issue Jan 31, 2025 · 0 comments
Open

npm:@toi/[email protected] import missing properties #27898

dsherret opened this issue Jan 31, 2025 · 0 comments

Comments

@dsherret
Copy link
Member

dsherret commented Jan 31, 2025

From: #27894

> import * as toi from 'npm:@toi/[email protected]'
undefined
>  const obj = () => toi.required().and(toi.obj.isplain());
  const req = () => toi.required();
  const num = () => toi.num.is();
  const str = () => toi.str.is();

  const isValid = obj().and(
    toi.obj.keys({
      number: req().and(num()),
      negNumber: req().and(num()),
      maxNumber: req().and(num()),
      string: req().and(str()),
      longString: req().and(str()),
      boolean: req().and(toi.bool.is()),
      deeplyNested: obj().and(
        toi.obj.keys({
          foo: req().and(str()),
          num: req().and(num()),
          bool: req().and(toi.bool.is()),
        }),
      ),
    }),
  );

Uncaught TypeError: Cannot read properties of undefined (reading 'isplain')
    at obj (<anonymous>:1:65)
    at <anonymous>:5:17

Version: Deno 2.1.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant