You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Registers a resource `name` at a fixed URI with metadata, which will use the given callback to respond to read requests.
613
+
*/
608
614
resource(
609
615
name: string,
610
616
uri: string,
611
617
metadata: ResourceMetadata,
612
618
readCallback: ReadResourceCallback,
613
619
): void;
614
620
621
+
/**
622
+
* Registers a resource `name` with a URI template pattern, which will use the given callback to respond to read requests.
623
+
*/
615
624
resource(
616
625
name: string,
617
626
uriTemplate: UriTemplate,
618
627
readCallback: ReadResourceCallback,
619
628
): void;
620
629
630
+
/**
631
+
* Registers a resource `name` with a URI template pattern and metadata, which will use the given callback to respond to read requests.
632
+
*/
621
633
resource(
622
634
name: string,
623
635
uriTemplate: UriTemplate,
624
636
metadata: ResourceMetadata,
625
637
readCallback: ReadResourceCallback,
626
638
): void;
627
639
640
+
/**
641
+
* Registers a resource `name` with a URI template pattern, which will use the list callback to enumerate matching resources and read callback to respond to read requests.
642
+
*/
628
643
resource(
629
644
name: string,
630
645
uriTemplate: UriTemplate,
631
646
listCallback: ListResourcesCallback,
632
647
readCallback: ReadResourceCallback,
633
648
): void;
634
649
650
+
/**
651
+
* Registers a resource `name` with a URI template pattern and metadata, which will use the list callback to enumerate matching resources and read callback to respond to read requests.
0 commit comments