Skip to content

Instantly share code, notes, and snippets.

@okunokentaro
Last active September 24, 2015 08:32
Show Gist options
  • Save okunokentaro/bd54a3a3ce30b023f926 to your computer and use it in GitHub Desktop.
Save okunokentaro/bd54a3a3ce30b023f926 to your computer and use it in GitHub Desktop.
bemmer.d.ts
declare module 'bemmer' {
export default bemmer;
}
declare namespace bemmer {
export function create<T>(...classNames: Array<string>): Builder<T>;
export interface Builder<T> {
(): string;
(elements: string): string;
(elements: string, modifiers: T): string;
}
}
@axross
Copy link

axross commented Sep 24, 2015

Builderの第二引数が存在するときの第一引数、非String値も許容してる

builder(null, { someModifier: true });

的なことができるように

@okunokentaro
Copy link
Author

拝承

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment