{"_id":"@288-toolkit/typed-context","_rev":"6-1541b1bfed754cc16b5a11eb855a2a2e","name":"@288-toolkit/typed-context","dist-tags":{"latest":"4.0.0"},"versions":{"1.0.0":{"name":"@288-toolkit/typed-context","version":"1.0.0","author":{"name":"DeuxHuitHuit"},"license":"MIT","_id":"@288-toolkit/typed-context@1.0.0","maintainers":[{"name":"nitriques","email":"open-source@deuxhuithuit.com"},{"name":"f-elix","email":"guerinfelix08@gmail.com"}],"dist":{"shasum":"1fd81d4d77ada3be1f865186c67c0af83993e4c4","tarball":"https://registry.npmjs.org/@288-toolkit/typed-context/-/typed-context-1.0.0.tgz","fileCount":5,"integrity":"sha512-C0QduaO8fQsIDUo0SXzsgUTEQ7O1TUZkLCErq/ThxnIz7s92kBC54bkprXkxlGBWZBgwDeVyNuP1TclR889bvw==","signatures":[{"sig":"MEQCIC6RTZSsbYB/0CZyDHu//zVXTqs/3qKTNFaLfbcWqRXYAiBtwwHaBwTP1PWDav1H/UMHD81iS4D6OQ4I8h5ngEFPWw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2289},"type":"module","_from":"file:288-toolkit-typed-context-1.0.0.tgz","exports":{".":{"default":"./src/index.ts"}},"scripts":{"lc":"npm run lint && npm run check","lint":"eslint --max-warnings=0 --cache .","test":"vitest run","check":"svelte-check --tsconfig ./tsconfig.json --fail-on-warnings","format":"npm run format:file .","lc:watch":"npm run lint && npm run check -- --watch","lint:fix":"npm run lint -- --fix","test:watch":"vitest","check:watch":"npm run check -- --watch","format:file":"npm run format:prettier -- --write","format:prettier":"prettier --config ./.prettierrc"},"_npmUser":{"name":"f-elix","email":"guerinfelix08@gmail.com"},"_resolved":"/private/var/folders/k6/gmpb3s_x4kb4v14gmbp18y_40000gs/T/81d68bdaf66983ebf2ae7a9ef9890b17/288-toolkit-typed-context-1.0.0.tgz","_integrity":"sha512-C0QduaO8fQsIDUo0SXzsgUTEQ7O1TUZkLCErq/ThxnIz7s92kBC54bkprXkxlGBWZBgwDeVyNuP1TclR889bvw==","_npmVersion":"9.8.1","description":"[!IMPORTANT] This package only exports typescript files.","directories":{},"_nodeVersion":"20.6.0","_hasShrinkwrap":false,"peerDependencies":{"svelte":"4.x"},"_npmOperationalInternal":{"tmp":"tmp/typed-context_1.0.0_1713902278770_0.39361005743480115","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@288-toolkit/typed-context","version":"1.0.1","author":{"name":"DeuxHuitHuit"},"license":"MIT","_id":"@288-toolkit/typed-context@1.0.1","maintainers":[{"name":"nitriques","email":"open-source@deuxhuithuit.com"},{"name":"f-elix","email":"guerinfelix08@gmail.com"}],"dist":{"shasum":"6cf191b4136aec5b9a2e85552bc746b616ba9ea3","tarball":"https://registry.npmjs.org/@288-toolkit/typed-context/-/typed-context-1.0.1.tgz","fileCount":6,"integrity":"sha512-dgX/H+m5SKe6PC5hQt+VQ09vPdwAQPSK/Wo5tR3FdBlQqVY9wfQggA4VTWYWgUBmMkfzXM7X4L0b4ldnvTu5YQ==","signatures":[{"sig":"MEQCIHgccD7+Mvf1CCJR08KpP0iEfFm3DNkf6oTlbku1OSeYAiB1WKLdtFhCKmm3g7qprZJlGh25r0tfuZq+KshDE5QmCA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2365},"type":"module","_from":"file:288-toolkit-typed-context-1.0.1.tgz","exports":{".":{"default":"./src/index.ts"}},"scripts":{"lc":"npm run lint && npm run check","lint":"eslint --max-warnings=0 --cache .","test":"vitest run","check":"svelte-check --tsconfig ./tsconfig.json --fail-on-warnings","format":"npm run format:file .","lc:watch":"npm run lint && npm run check -- --watch","lint:fix":"npm run lint -- --fix","test:watch":"vitest","check:watch":"npm run check -- --watch","format:file":"npm run format:prettier -- --write","format:prettier":"prettier --config ./.prettierrc"},"_npmUser":{"name":"f-elix","email":"guerinfelix08@gmail.com"},"_resolved":"/private/var/folders/k6/gmpb3s_x4kb4v14gmbp18y_40000gs/T/0454da920e259fb33986f26f95350138/288-toolkit-typed-context-1.0.1.tgz","_integrity":"sha512-dgX/H+m5SKe6PC5hQt+VQ09vPdwAQPSK/Wo5tR3FdBlQqVY9wfQggA4VTWYWgUBmMkfzXM7X4L0b4ldnvTu5YQ==","_npmVersion":"9.8.1","description":"[!IMPORTANT] This package only exports typescript files.","directories":{},"_nodeVersion":"20.6.0","_hasShrinkwrap":false,"peerDependencies":{"svelte":"4.x"},"_npmOperationalInternal":{"tmp":"tmp/typed-context_1.0.1_1713963371266_0.7877930813925662","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@288-toolkit/typed-context","version":"1.0.2","author":{"name":"DeuxHuitHuit"},"license":"MIT","_id":"@288-toolkit/typed-context@1.0.2","maintainers":[{"name":"nitriques","email":"open-source@deuxhuithuit.com"},{"name":"f-elix","email":"guerinfelix08@gmail.com"}],"dist":{"shasum":"535e43eff31a85fd3c643a33086cecb0510fdf01","tarball":"https://registry.npmjs.org/@288-toolkit/typed-context/-/typed-context-1.0.2.tgz","fileCount":3,"integrity":"sha512-BzxQn+/gTOPMZcJxfCuyAf7yCAXa4ViUnk0iN/Im8lEnUbzqMz1WrOx2RhYuo8uCsl8Vhq6EdAkMgKEkvR92QQ==","signatures":[{"sig":"MEUCIQCUqsTM2Eb/XeY3M43dUtB0AO3V1XJ9oP/yBnxKTvSouAIgC+4NeflcU9WOuVTPqZKvZQWY3gVeZ1XM3PxCH7ckkN4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2034},"type":"module","_from":"file:288-toolkit-typed-context-1.0.2.tgz","exports":{".":{"default":"./src/index.ts"}},"scripts":{"lc":"npm run lint && npm run check","lint":"eslint --max-warnings=0 --cache .","test":"vitest run","check":"svelte-check --tsconfig ./tsconfig.json --fail-on-warnings","format":"npm run format:file .","lc:watch":"npm run lint && npm run check -- --watch","lint:fix":"npm run lint -- --fix","test:watch":"vitest","check:watch":"npm run check -- --watch","format:file":"npm run format:prettier -- --write","format:prettier":"prettier --config ./.prettierrc"},"_npmUser":{"name":"f-elix","email":"guerinfelix08@gmail.com"},"_resolved":"/tmp/22ecd692a867ae29797ada1ab561ca30/288-toolkit-typed-context-1.0.2.tgz","_integrity":"sha512-BzxQn+/gTOPMZcJxfCuyAf7yCAXa4ViUnk0iN/Im8lEnUbzqMz1WrOx2RhYuo8uCsl8Vhq6EdAkMgKEkvR92QQ==","_npmVersion":"10.5.0","description":"Wraps typed versions of Svelte's `getContext` and `setContext` functions with the provided type argument and context key.","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"peerDependencies":{"svelte":"4.x"},"_npmOperationalInternal":{"tmp":"tmp/typed-context_1.0.2_1714076105391_0.37661748083117197","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"@288-toolkit/typed-context","version":"3.0.0","author":{"name":"DeuxHuitHuit"},"license":"MIT","_id":"@288-toolkit/typed-context@3.0.0","maintainers":[{"name":"nitriques","email":"open-source@deuxhuithuit.com"},{"name":"f-elix","email":"guerinfelix08@gmail.com"}],"dist":{"shasum":"144556f3973b7933fb83f8098f8b3a6fa30d7456","tarball":"https://registry.npmjs.org/@288-toolkit/typed-context/-/typed-context-3.0.0.tgz","fileCount":4,"integrity":"sha512-6GMHDs2Ah8R1e51UQzCV7Pj+xmG/q6aNut261LyQQiAX8xu+LJRUD8cVD61Pw34do1UzI4z+xty9Ebz63TGvCg==","signatures":[{"sig":"MEUCIQCUhxDVrdjLZqvmP7qIizkXFfkaJy9jhfCpV/VvZc0aTAIgC80oim2LThB4yxxX09ygycARxc5iDgD7L6iaPj7A7Bw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2399},"type":"module","_from":"file:288-toolkit-typed-context-3.0.0.tgz","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"lc":"npm run lint && npm run check","lint":"eslint --max-warnings=0 --cache .","test":"vitest run","build":"svelte-package","check":"svelte-check --tsconfig ./tsconfig.json --fail-on-warnings","format":"npm run format:file .","lc:watch":"npm run lint && npm run check -- --watch","lint:fix":"npm run lint -- --fix","test:watch":"vitest","check:watch":"npm run check -- --watch","format:file":"npm run format:prettier -- --write","format:prettier":"prettier --config ./.prettierrc"},"_npmUser":{"name":"f-elix","email":"guerinfelix08@gmail.com"},"_resolved":"/tmp/ae1ec026ba3dabc4764a460569b50542/288-toolkit-typed-context-3.0.0.tgz","_integrity":"sha512-6GMHDs2Ah8R1e51UQzCV7Pj+xmG/q6aNut261LyQQiAX8xu+LJRUD8cVD61Pw34do1UzI4z+xty9Ebz63TGvCg==","_npmVersion":"10.5.0","description":"Wraps typed versions of Svelte's `getContext` and `setContext` functions with the provided type argument and context key.","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"peerDependencies":{"svelte":"4.x"},"_npmOperationalInternal":{"tmp":"tmp/typed-context_3.0.0_1714509580719_0.545796154048563","host":"s3://npm-registry-packages"}},"4.0.0":{"name":"@288-toolkit/typed-context","version":"4.0.0","author":{"name":"DeuxHuitHuit"},"license":"MIT","_id":"@288-toolkit/typed-context@4.0.0","maintainers":[{"name":"nitriques","email":"open-source@deuxhuithuit.com"},{"name":"f-elix","email":"guerinfelix08@gmail.com"}],"dist":{"shasum":"127e75e538bf515d9c2d61e518e463fa30869182","tarball":"https://registry.npmjs.org/@288-toolkit/typed-context/-/typed-context-4.0.0.tgz","fileCount":4,"integrity":"sha512-DX7g/4MuqQ3W9Q5gYjdJTwyaPRUd/SZENNOtB3u5OPa+dQLOSd8ZqElp6W7KqqgjPX5MAtXooh+U3JSp9HBUtg==","signatures":[{"sig":"MEYCIQDAfRf3bla7xRZ1qeUGCMavK7fsz6wZ5LOggFiZCifdxgIhAJY7BqCxgObCP5MeVydANjTY90Swy633b8aG9iD6XFAo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":2406},"type":"module","_from":"file:288-toolkit-typed-context-4.0.0.tgz","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"lc":"npm run lint && npm run check","lint":"eslint --max-warnings=0 --cache .","test":"vitest run","build":"svelte-package","check":"svelte-check --tsconfig ./tsconfig.json --fail-on-warnings","format":"npm run format:file .","lc:watch":"npm run lint && npm run check -- --watch","lint:fix":"npm run lint -- --fix","test:watch":"vitest","check:watch":"npm run check -- --watch","format:file":"npm run format:prettier -- --write","format:prettier":"prettier --config ./.prettierrc"},"_npmUser":{"name":"f-elix","email":"guerinfelix08@gmail.com"},"_resolved":"/private/var/folders/k6/gmpb3s_x4kb4v14gmbp18y_40000gs/T/0df2e113e65fc44415d5b3e495a8455c/288-toolkit-typed-context-4.0.0.tgz","_integrity":"sha512-DX7g/4MuqQ3W9Q5gYjdJTwyaPRUd/SZENNOtB3u5OPa+dQLOSd8ZqElp6W7KqqgjPX5MAtXooh+U3JSp9HBUtg==","_npmVersion":"10.5.0","description":"Wraps typed versions of Svelte's `getContext` and `setContext` functions with the provided type argument and context key.","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"peerDependencies":{"svelte":"4.x || 5.x"},"_npmOperationalInternal":{"tmp":"tmp/typed-context_4.0.0_1730469951787_0.5868468823229833","host":"s3://npm-registry-packages"}}},"time":{"created":"2024-04-23T19:57:58.650Z","modified":"2025-09-23T15:34:46.697Z","1.0.0":"2024-04-23T19:57:58.937Z","1.0.1":"2024-04-24T12:56:11.404Z","1.0.2":"2024-04-25T20:15:05.555Z","3.0.0":"2024-04-30T20:39:40.873Z","4.0.0":"2024-11-01T14:05:51.992Z"},"author":{"name":"DeuxHuitHuit"},"license":"MIT","description":"Wraps typed versions of Svelte's `getContext` and `setContext` functions with the provided type argument and context key.","maintainers":[{"email":"open-source@deuxhuithuit.com","name":"nitriques"}],"readme":"# Typed-context\n\nWraps typed versions of Svelte's `getContext` and `setContext` functions with the provided type\nargument and context key.\n\n## Usage\n\n`my-context.ts`\n\n```ts\nimport { createTypedContext } from '@288-toolkit/typed-context';\n\ntype MyContext = {\n\thello: string;\n};\n\nexport const { getContext, setContext } = createTypedContext<MyContext>('my-context');\n```\n\n`my-parent-component.ts`\n\n```svelte\n<script lang=\"ts\">\n\timport { setContext } from './my-context.ts';\n\n\tsetContext({\n\t\thello: 'world',\n\t\tother: 'prop' // Type error\n\t});\n</script>\n```\n\n`my-child-component.ts`\n\n```svelte\n<script lang=\"ts\">\n\timport { getContext } from './my-context.ts';\n\n\tconst ctx = getContext();\n\n\tconsole.log(ctx.hello); // 'world'\n\tconsole.log(ctx.other); // Type error\n</script>\n```\n","readmeFilename":"README.md"}