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

omit should accept readonly arrays #267

Closed
aleclarson opened this issue Oct 14, 2024 · 7 comments
Closed

omit should accept readonly arrays #267

aleclarson opened this issue Oct 14, 2024 · 7 comments
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@aleclarson
Copy link
Member

aleclarson commented Oct 14, 2024

From sodiray/radash#429 by @matthew-holder-revvity

A common pattern for building unions of keys is to first define an as const tuple/array of them then using (typeof arr)[number] to determine the value type. Since those arrays are read-only, they cannot be used with omit.

PR welcome!

@aleclarson aleclarson added help wanted Extra attention is needed good first issue Good for newcomers rejected A rejected proposal. and removed rejected A rejected proposal. labels Oct 14, 2024
@shan-shaji
Copy link
Contributor

@aleclarson , Can i work on this?

@shan-shaji
Copy link
Contributor

Hey @MarlonPassos-git , Do you know why I am getting this error when running vitest test?

 Error: Cannot find module @rollup/rollup-darwin-arm64. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
    at requireWithFriendlyError (/Users/jisjoe/Documents/shan/radashi/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/native.js:59:9)
    at Object.<anonymous> (/Users/jisjoe/Documents/shan/radashi/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/native.js:68:76)
    ... 3 lines matching cause stack trace ...
    at Function.Module._load (node:internal/modules/cjs/loader:911:12)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
    at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:530:24) {
  [cause]: Error: Cannot find module '@rollup/rollup-darwin-arm64'
  Require stack:
  - /Users/jisjoe/Documents/shan/radashi/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/native.js
      at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
      at Function.Module._load (node:internal/modules/cjs/loader:873:27)
      at Module.require (node:internal/modules/cjs/loader:1100:19)
      at require (node:internal/modules/cjs/helpers:119:18)
      at requireWithFriendlyError (/Users/jisjoe/Documents/shan/radashi/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/native.js:41:10)
      at Object.<anonymous> (/Users/jisjoe/Documents/shan/radashi/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/native.js:68:76)
      at Module._compile (node:internal/modules/cjs/loader:1198:14)
      at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
      at Module.load (node:internal/modules/cjs/loader:1076:32)
      at Function.Module._load (node:internal/modules/cjs/loader:911:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
      '/Users/jisjoe/Documents/shan/radashi/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/native.js'
    ]
  }
}

@MarlonPassos-git
Copy link
Contributor

@shan-shaji Strange. Can you provide your OS information? You have used pnpm to install the dependencies?

@MarlonPassos-git
Copy link
Contributor

Anyway, you can choose to use dev Container to develop your contributions. In the project, we configure an environment fully ready to run the project.

@shan-shaji
Copy link
Contributor

Hey @MarlonPassos-git , I used pnpm to install the dependencies, but when I run pnpm test, I encounter the following error.

Screenshot 2024-10-18 at 10 26 18 PM

@shan-shaji
Copy link
Contributor

shan-shaji commented Oct 18, 2024

Anyway, you can choose to use dev Container to develop your contributions. In the project, we configure an environment fully ready to run the project.

Cool thanks @MarlonPassos-git will try that.

@MarlonPassos-git
Copy link
Contributor

Resolved at #272

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

No branches or pull requests

3 participants