@shopify/useful-types
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -1,1 +0,4 @@ | ||
module.exports = require("./build/cjs/index.js"); | ||
function interopRequireDefault(obj) { | ||
return obj && obj.__esModule ? obj : {default: obj}; | ||
} | ||
module.exports = interopRequireDefault(require("./build/cjs/index.js")); |
{ | ||
"name": "@shopify/useful-types", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"license": "MIT", | ||
"description": "A few handy TypeScript types", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"types": "./build/ts/index.d.ts", | ||
"sideEffects": false, | ||
@@ -31,4 +31,3 @@ "publishConfig": { | ||
"index.mjs", | ||
"index.esnext", | ||
"index.d.ts" | ||
"index.esnext" | ||
], | ||
@@ -45,3 +44,3 @@ "module": "index.mjs", | ||
}, | ||
"gitHead": "0edc9e3b7df7b6a4805cc3ff1443641cdb8e8a72" | ||
"gitHead": "c7d64cb78303f2752c172f6df52b78bc56bebd40" | ||
} |
@@ -112,16 +112,15 @@ # `@shopify/useful-types` | ||
```ts | ||
interface Obj { | ||
```ts | ||
interface Obj { | ||
__typename: string; | ||
foo: string; | ||
bar: { | ||
__typename: string; | ||
foo: string; | ||
bar: { | ||
__typename: string, | ||
baz: string | ||
}; | ||
} | ||
type SelectiveObj = DeepOmit<Obj, '__typename'>; // {foo: string; bar: {baz: string}} | ||
``` | ||
baz: string; | ||
}; | ||
} | ||
type SelectiveObj = DeepOmit<Obj, '__typename'>; // {foo: string; bar: {baz: string}} | ||
``` | ||
- `DeepOmitArray<T extends any[], K>` Iterate over all properties in an array of types and omits those matching `K`. | ||
@@ -128,0 +127,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
194620
60
16
135