Skip to content

Commit d5a3e5d

Browse files
authored
Merge pull request #282 from murgatroid99/purejs_unimplemented_errors
Pure JS: Add unimplemented errors for several API functions
2 parents e389a25 + dd3eb9e commit d5a3e5d

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

packages/grpc-js-core/src/index.ts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,48 @@ export {
8585
* @param client The client to close.
8686
*/
8787
export const closeClient = (client: Client) => client.close();
88+
89+
export const waitForClientReady = (client: Client, deadline: Date|number, callback: (error: Error | null) => void) => client.waitForReady(deadline, callback);
90+
91+
/**** Unimplemented function stubs ****/
92+
93+
export const loadObject = (value: any, options: any) => {
94+
throw new Error('Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead');
95+
}
96+
97+
export const load = (filename: any, format: any, options: any) => {
98+
throw new Error('Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead');
99+
}
100+
101+
export const setLogger = (logger: any) => {
102+
throw new Error('Not yet implemented');
103+
}
104+
105+
export const setLogVerbosity = (verbosity: any) => {
106+
throw new Error('Not yet implemented');
107+
}
108+
109+
export const Server = (options: any) => {
110+
throw new Error('Not yet implemented');
111+
}
112+
113+
export const ServerCredentials = {
114+
createSsl: (rootCerts: any, keyCertPairs: any, checkClientCertificate: any) => {
115+
throw new Error('Not yet implemented');
116+
},
117+
createInsecure: () => {
118+
throw new Error('Not yet implemented');
119+
}
120+
}
121+
122+
export const getClientChannel = (client: any) => {
123+
throw new Error('Not available in this library');
124+
}
125+
126+
export const StatusBuilder = () => { throw new Error('Not yet implemented'); }
127+
128+
export const ListenerBuilder = () => { throw new Error('Not yet implemented'); }
129+
130+
export const InterceptorBuilder = () => { throw new Error('Not yet implemented'); }
131+
132+
export const InterceptingCall = () => { throw new Error('Not yet implemented'); }

0 commit comments

Comments
 (0)