New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@fluidframework/core-interfaces

Package Overview
Dependencies
Maintainers
2
Versions
473
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluidframework/core-interfaces - npm Package Compare versions

Comparing version 0.43.1000-60265 to 0.43.1000-60718

lib/test/types/validateCoreInterfacesPrevious.d.ts

8

api-report/core-interfaces.api.md

@@ -10,3 +10,5 @@ ## API Report File for "@fluidframework/core-interfaces"

// @public
export type FluidObject<T = unknown> = Partial<Pick<T, FluidObjectProviderKeys<T>>>;
export type FluidObject<T = unknown> = {
readonly [P in FluidObjectProviderKeys<T>]?: T[P];
};

@@ -19,3 +21,3 @@ // @public

// @internal
export type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Exclude<T[TProp], undefined> ? TProp : never;
export type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never;

@@ -47,3 +49,3 @@ // @public @deprecated (undocumented)

// @public
export interface IFluidHandle<T = IFluidObject & FluidObject & IFluidLoadable> extends IProvideFluidHandle {
export interface IFluidHandle<T = FluidObject & IFluidLoadable> extends IProvideFluidHandle {
// @deprecated (undocumented)

@@ -50,0 +52,0 @@ readonly absolutePath: string;

@@ -6,3 +6,2 @@ /*!

import { IRequest, IResponse } from "./fluidRouter";
import { IFluidObject } from "./fluidObject";
import { IFluidLoadable } from "./fluidLoadable";

@@ -44,3 +43,3 @@ import { FluidObject } from "./provider";

*/
export interface IFluidHandle<T = IFluidObject & FluidObject & IFluidLoadable> extends IProvideFluidHandle {
export interface IFluidHandle<T = FluidObject & IFluidLoadable> extends IProvideFluidHandle {
/**

@@ -47,0 +46,0 @@ * @deprecated - Do not use handle's path for routing. Use `get` to get the underlying object.

@@ -24,3 +24,3 @@ /*!

*/
export declare type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Exclude<T[TProp], undefined> ? TProp : never;
export declare type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never;
/**

@@ -56,3 +56,5 @@ * This utility type take interface(s) that follow the FluidObject pattern, and produces

*/
export declare type FluidObject<T = unknown> = Partial<Pick<T, FluidObjectProviderKeys<T>>>;
export declare type FluidObject<T = unknown> = {
readonly [P in FluidObjectProviderKeys<T>]?: T[P];
};
/**

@@ -59,0 +61,0 @@ * This utility type creates a type that is the union of all keys on the generic type

@@ -6,3 +6,2 @@ /*!

import { IRequest, IResponse } from "./fluidRouter";
import { IFluidObject } from "./fluidObject";
import { IFluidLoadable } from "./fluidLoadable";

@@ -44,3 +43,3 @@ import { FluidObject } from "./provider";

*/
export interface IFluidHandle<T = IFluidObject & FluidObject & IFluidLoadable> extends IProvideFluidHandle {
export interface IFluidHandle<T = FluidObject & IFluidLoadable> extends IProvideFluidHandle {
/**

@@ -47,0 +46,0 @@ * @deprecated - Do not use handle's path for routing. Use `get` to get the underlying object.

@@ -24,3 +24,3 @@ /*!

*/
export declare type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Exclude<T[TProp], undefined> ? TProp : never;
export declare type FluidObjectProviderKeys<T, TProp extends keyof T = keyof T> = string extends TProp ? never : number extends TProp ? never : TProp extends keyof Required<T>[TProp] ? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] ? TProp : never : never;
/**

@@ -56,3 +56,5 @@ * This utility type take interface(s) that follow the FluidObject pattern, and produces

*/
export declare type FluidObject<T = unknown> = Partial<Pick<T, FluidObjectProviderKeys<T>>>;
export declare type FluidObject<T = unknown> = {
readonly [P in FluidObjectProviderKeys<T>]?: T[P];
};
/**

@@ -59,0 +61,0 @@ * This utility type creates a type that is the union of all keys on the generic type

@@ -1,2 +0,2 @@

var _a, _b, _c;
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
/*!

@@ -80,2 +80,19 @@ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.

}
// validate nested property is FluidObject too
{
const foo = getFluidObject();
// @ts-expect-error "Property 'z' does not exist on type 'FluidObject<IFoo>'."
useProvider(foo.z);
}
// validate provider inheritance
{
const p = getFluidObject();
useProvider((_d = p.IFooParent) === null || _d === void 0 ? void 0 : _d.parent());
const c = getFluidObject();
// @ts-expect-error Property 'IFooParent' does not exist on type 'FluidObject<IFooProvideChild>'.
useProvider((_e = c.IFooParent) === null || _e === void 0 ? void 0 : _e.parent());
useProvider((_f = c.IFooChild) === null || _f === void 0 ? void 0 : _f.child());
useProvider((_g = c.IFooChild) === null || _g === void 0 ? void 0 : _g.parent());
useProvider((_j = (_h = c.IFooChild) === null || _h === void 0 ? void 0 : _h.IFooParent) === null || _j === void 0 ? void 0 : _j.parent());
}
//# sourceMappingURL=fluidObjectTypes.js.map
{
"name": "@fluidframework/core-interfaces",
"version": "0.43.1000-60265",
"version": "0.43.1000-60718",
"description": "Fluid object interfaces",

@@ -24,4 +24,3 @@ "homepage": "https://fluidframework.com",

"build:full:compile": "npm run build:compile",
"build:gen": "npm run build:gen:typetests",
"build:gen:typetests": "fluid-type-validator -d .",
"build:gen": "npm run typetests:gen",
"ci:build": "npm run build:gen && npm run build:compile",

@@ -40,12 +39,11 @@ "ci:build:docs": "api-extractor run --typescript-compiler-folder ./node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/",

"tsfmt": "tsfmt --verify",
"tsfmt:fix": "tsfmt --replace"
"tsfmt:fix": "tsfmt --replace",
"typetests:gen": "fluid-type-validator -d .",
"typetests:prepare": "fluid-type-validator -d . -p"
},
"devDependencies": {
"@fluidframework/build-common": "^0.23.0",
"@fluidframework/build-tools": "^0.2.58041",
"@fluidframework/core-interfaces-0.39.8": "npm:@fluidframework/core-interfaces@0.39.8",
"@fluidframework/core-interfaces-0.40.0": "npm:@fluidframework/core-interfaces@0.40.0",
"@fluidframework/core-interfaces-0.41.0": "npm:@fluidframework/core-interfaces@0.41.0",
"@fluidframework/core-interfaces-0.42.0": "npm:@fluidframework/core-interfaces@0.42.0",
"@fluidframework/eslint-config-fluid": "^0.27.0",
"@fluidframework/build-tools": "^0.2.60108",
"@fluidframework/core-interfaces-previous": "npm:@fluidframework/core-interfaces@^0.42.0",
"@fluidframework/eslint-config-fluid": "^0.27.2000-59622",
"@microsoft/api-extractor": "^7.16.1",

@@ -72,44 +70,2 @@ "@rushstack/eslint-config": "^2.5.1",

"broken": {
"0.39.8": {
"RemovedVariableDeclaration_IFluidConfiguration": {
"backCompat": false,
"forwardCompat": false
},
"RemovedInterfaceDeclaration_IFluidConfiguration": {
"backCompat": false,
"forwardCompat": false
},
"RemovedInterfaceDeclaration_IProvideFluidConfiguration": {
"backCompat": false,
"forwardCompat": false
}
},
"0.40.0": {
"RemovedVariableDeclaration_IFluidConfiguration": {
"backCompat": false,
"forwardCompat": false
},
"RemovedInterfaceDeclaration_IFluidConfiguration": {
"backCompat": false,
"forwardCompat": false
},
"RemovedInterfaceDeclaration_IProvideFluidConfiguration": {
"backCompat": false,
"forwardCompat": false
}
},
"0.41.0": {
"RemovedVariableDeclaration_IFluidConfiguration": {
"backCompat": false,
"forwardCompat": false
},
"RemovedInterfaceDeclaration_IFluidConfiguration": {
"backCompat": false,
"forwardCompat": false
},
"RemovedInterfaceDeclaration_IProvideFluidConfiguration": {
"backCompat": false,
"forwardCompat": false
}
},
"0.42.0": {

@@ -116,0 +72,0 @@ "RemovedVariableDeclaration_IFluidConfiguration": {

@@ -7,3 +7,2 @@ /*!

import { IRequest, IResponse } from "./fluidRouter";
import { IFluidObject } from "./fluidObject";
import { IFluidLoadable } from "./fluidLoadable";

@@ -57,3 +56,3 @@ import { FluidObject } from "./provider";

// REVIEW: Constrain `T` to something? How do we support dds and datastores safely?
T = IFluidObject & FluidObject & IFluidLoadable
T = FluidObject & IFluidLoadable
> extends IProvideFluidHandle {

@@ -60,0 +59,0 @@

@@ -27,5 +27,7 @@ /*!

string extends TProp ? never : number extends TProp? never : // exclude indexers [key:string |number]: any
TProp extends keyof Exclude<T[TProp], undefined> // TProp is a property of T, and T[TProp]
? TProp
:never;
TProp extends keyof Required<T>[TProp] // TProp is a property of T, and T[TProp]
? Required<T>[TProp] extends Required<Required<T>[TProp]>[TProp] // T[TProp] is the same type as T[TProp][TProp]
? TProp
: never
: never;

@@ -62,3 +64,5 @@ /**

*/
export type FluidObject<T = unknown> = Partial<Pick<T, FluidObjectProviderKeys<T>>>;
export type FluidObject<T = unknown> = {
readonly [P in FluidObjectProviderKeys<T>]?: T[P];
};

@@ -65,0 +69,0 @@ /**

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc