Skip to content

Commit d2a3cbc

Browse files
committed
Fix style issues
1 parent 62d5f3f commit d2a3cbc

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

lib/src/protofier.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import * as proto from './vendor/embedded_sass_pb';
88
import * as utils from './utils';
99
import {FunctionRegistry} from './function-registry';
1010
import {SassArgumentList} from './value/argument-list';
11-
import {SassColor, KnownColorSpace} from './value/color';
11+
import {KnownColorSpace, SassColor} from './value/color';
1212
import {SassFunction} from './value/function';
1313
import {ListSeparator, SassList} from './value/list';
1414
import {SassMap} from './value/map';

lib/src/value/color.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -295,15 +295,15 @@ function checkChangeDeprecations(
295295
[key in ChannelName]?: number | null;
296296
},
297297
channels: ChannelName[]
298-
) {
298+
): void {
299299
if (options.alpha === null) emitNullAlphaDeprecation();
300300
for (const channel of channels) {
301301
if (options[channel] === null) emitColor4ApiChangeNullDeprecation(channel);
302302
}
303303
}
304304

305305
/** Warn users about legacy color channel getters. */
306-
function emitColor4ApiGetterDeprecation(name: string) {
306+
function emitColor4ApiGetterDeprecation(name: string): void {
307307
console.warn(
308308
'Deprecation [color-4-api]: ' +
309309
`\`${name}\` is deprecated, use \`channel\` instead.` +
@@ -316,7 +316,7 @@ function emitColor4ApiGetterDeprecation(name: string) {
316316
* Warn users about changing channels not in the current color space without
317317
* explicitly setting `space`.
318318
*/
319-
function emitColor4ApiChangeSpaceDeprecation() {
319+
function emitColor4ApiChangeSpaceDeprecation(): void {
320320
console.warn(
321321
'Deprecation [color-4-api]: ' +
322322
"Changing a channel not in this color's space without explicitly " +
@@ -327,7 +327,7 @@ function emitColor4ApiChangeSpaceDeprecation() {
327327
}
328328

329329
/** Warn users about `null` channel values without setting `space`. */
330-
function emitColor4ApiChangeNullDeprecation(channel: string) {
330+
function emitColor4ApiChangeNullDeprecation(channel: string): void {
331331
console.warn(
332332
'Deprecation [color-4-api]: ' +
333333
`Passing \`${channel}: null\` without setting \`space\` is deprecated.` +
@@ -337,7 +337,7 @@ function emitColor4ApiChangeNullDeprecation(channel: string) {
337337
}
338338

339339
/** Warn users about null-alpha deprecation. */
340-
function emitNullAlphaDeprecation() {
340+
function emitNullAlphaDeprecation(): void {
341341
console.warn(
342342
'Deprecation [null-alpha]: ' +
343343
'Passing `alpha: null` without setting `space` is deprecated.' +
@@ -375,7 +375,7 @@ export class SassColor extends Value {
375375
private channel2Id!: ChannelName;
376376

377377
// Sets channel names based on this color's color space
378-
private setChannelIds(space: KnownColorSpace) {
378+
private setChannelIds(space: KnownColorSpace): void {
379379
switch (space) {
380380
case 'rgb':
381381
case 'srgb':
@@ -940,10 +940,10 @@ export class SassColor extends Value {
940940
spaceSetExplicitly: boolean
941941
): SassColor {
942942
const color = this.toSpace(space);
943-
const getChangedValue = (channel: ChannelName) => {
943+
function getChangedValue(channel: ChannelName): number | null {
944944
if (isNumberOrNull(options[channel])) return options[channel];
945945
return color.channel(channel);
946-
};
946+
}
947947

948948
switch (space) {
949949
case 'hsl':
@@ -1099,7 +1099,7 @@ export class SassColor extends Value {
10991099
space?: ColorSpaceXyz;
11001100
}
11011101
): SassColor;
1102-
change(options: ConstructorOptions) {
1102+
change(options: ConstructorOptions): SassColor {
11031103
const spaceSetExplicitly = !!options.space;
11041104
let space = options.space ?? this.space;
11051105
if (this.isLegacy && !spaceSetExplicitly) {

0 commit comments

Comments
 (0)