DefinitelyTyped/types/dvtng-jss/index.d.ts
Brenton Simpson c55bd19de2 Renamed jss to dvtng-jss
Fixes #19974

The type definitions in `@types/jss` don't match the `jss` package on npm, which has nearly 400k monthly downloads.  I'm not sure where to put the definitions currently squatting at `jss`, as it [doesn't appear that](https://www.npmjs.com/~dvtng) @dvtng has published them.
2017-11-30 17:42:24 -08:00

51 lines
1.1 KiB
TypeScript

// Type definitions for jss v0.6
// Project: https://github.com/Box9/jss
// Definitions by: Valentin Robert <https://github.com/Ptival>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface Properties {
[name: string]: string;
}
interface Selectors {
[selector: string]: Properties;
}
interface JSS {
/**
* Retrieve all rules added via JSS, organized by selectors
*/
get(): Selectors;
/**
* Retrieve rules added via JSS for a given selector
* @param s CSS selector
*/
get(s: string): Properties;
/**
* Retrieve all rules specified for a given selector (not necessarily added via JSS)
* @param s CSS selector
*/
getAll(s: string): Properties;
/**
* Remove all rules added via JSS
*/
remove(): void;
/**
* Remove all rules added via JSS for the given selector
*/
remove(s: string): void;
/**
* Add or extend an existing rule
* @param s CSS selector
* @param p CSS properties
*/
set(s: string, p: Properties): void;
}
declare var jss: JSS;