Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/phoenix_live_view

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/phoenix_live_view - npm Package Compare versions

Comparing version 0.18.5 to 0.20.0

47

phoenix_live_view/index.d.ts

@@ -0,1 +1,16 @@

// Project: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/phoenix_live_view
// Definitions by: Peter Zingg <https://github.com/pzingg>
// Igor Barchenkov <https://github.com/ibarchenkov>
// Rodolfo Carvalho <https://github.com/rhcarvalho>
// François Roland <https://github.com/francois-codes>
//
// Changelog:
// Version 0.20 refactored ViewHook interface with generic type and
// ViewHookInternal interface
//
// Version 0.17 added LiveSocket.execJS() method for executing JavaScript utility operations on the client
// See: https://github.com/phoenixframework/phoenix_live_view/blob/master/CHANGELOG.md#enhancements-17
//
// Version 0.15 added options and interfaces for LiveView uploads
// See: https://hexdocs.pm/phoenix_live_view/uploads.html
// Version 0.15.4 added options and interfaces for LiveView uploads

@@ -7,3 +22,3 @@ // See: https://hexdocs.pm/phoenix_live_view/uploads.html

import { Socket, SocketConnectOption } from "phoenix";
import { Socket } from "phoenix";

@@ -35,3 +50,3 @@ export interface Defaults {

dom?: DomOptions | undefined;
hooks?: object | undefined;
hooks?: HooksOptions | undefined;
loaderTimeout?: number | undefined;

@@ -149,3 +164,3 @@ params?: object | undefined;

export interface ViewHook {
export interface ViewHookInternal {
el: HTMLElement;

@@ -163,11 +178,23 @@ viewName: string;

// callbacks
mounted?: (() => void) | undefined;
beforeUpdate?: (() => void) | undefined;
updated?: (() => void) | undefined;
beforeDestroy?: (() => void) | undefined;
destroyed?: (() => void) | undefined;
disconnected?: (() => void) | undefined;
reconnected?: (() => void) | undefined;
mounted?: () => void;
beforeUpdate?: () => void;
updated?: () => void;
beforeDestroy?: () => void;
destroyed?: () => void;
disconnected?: () => void;
reconnected?: () => void;
}
export interface ViewHook<T extends object = {}> {
mounted?: (this: T & ViewHookInternal) => void;
beforeUpdate?: (this: T & ViewHookInternal) => void;
updated?: (this: T & ViewHookInternal) => void;
beforeDestroy?: (this: T & ViewHookInternal) => void;
destroyed?: (this: T & ViewHookInternal) => void;
disconnected?: (this: T & ViewHookInternal) => void;
reconnected?: (this: T & ViewHookInternal) => void;
}
export type HooksOptions = Record<string, ViewHook<any>>;
export class View {

@@ -174,0 +201,0 @@ constructor(el: HTMLElement, liveSocket: LiveSocket, parentView: View, href: string, flash: string);

{
"name": "@types/phoenix_live_view",
"version": "0.18.5",
"version": "0.20.0",
"description": "TypeScript definitions for phoenix_live_view",

@@ -25,4 +25,5 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/phoenix_live_view",

},
"typesPublisherContentHash": "b34979f396e662d23cc29db3f5eed5f8bb064998481ce9eda0f47c7a352ebe3a",
"typeScriptVersion": "4.7"
"peerDependencies": {},
"typesPublisherContentHash": "19b6fd4eb3f8896d5c271c8755c91acd1f8c3bbab830fdd785ae7e9402f8ba28",
"typeScriptVersion": "4.9"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Thu, 16 May 2024 16:07:16 GMT
* Last updated: Wed, 20 Nov 2024 17:02:38 GMT
* Dependencies: [@types/phoenix](https://npmjs.com/package/@types/phoenix)

@@ -14,0 +14,0 @@

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