Skip to content

Instantly share code, notes, and snippets.

@ypcode
Created July 29, 2018 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ypcode/991fa9b892fb1930836bbaef3f39bd7d to your computer and use it in GitHub Desktop.
Save ypcode/991fa9b892fb1930836bbaef3f39bd7d to your computer and use it in GitHub Desktop.
import { ServiceKey } from "@microsoft/sp-core-library";
export interface IGreetingsService {
sayHello(who: string) : string;
}
export class GreetingsService implements IGreetingsService {
public sayHello(who: string) : string {
return `Hello ${who}`;
}
}
export const GreetingsServiceKey = ServiceKey.create<IGreetingsService>(
'YPCODE:GreetingsService',
GreetingsService
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment