This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const seasons = Object.freeze({ | |
AUTUMN: 'autumn', | |
SPRING: 'spring', | |
SUMMER: 'summer', | |
WINTER: 'winter', | |
}); | |
const season = seasons.spring; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @type {season} | |
*/ | |
const season = 'summer'; | |
/** | |
* @typedef {'autumn' | 'spring' | 'summer' | 'winter'} season | |
**/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as seasons from './seasons'; | |
/** | |
* @param {number} month | |
* @returns {season} | |
**/ | |
const getSummer = (month) => { | |
if ([5, 6, 7].includes(month)) { | |
return seasons.SUMMER; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const AUTUMN = 'autumn'; | |
export const SPRING = 'spring'; | |
export const SUMMER = 'summer'; | |
export const WINTER = 'winter'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as seasons from './seasons'; | |
export type season = typeof seasons[keyof typeof seasons]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.component { | |
<<<<<<< HEAD | |
padding: 1em 0.5em 3em; | |
======= | |
padding: 2em 0.5em 1em; | |
>>>>>>> my-branch | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.component { | |
margin-top: 1em; | |
} | |
.component__centred { | |
margin: 0 auto; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.component { | |
margin-top: 1em; | |
margin: 0 auto; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.component { | |
margint-top: 1em; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.component { | |
background-image: url(images/bg.gif); | |
background-position-x: left; | |
background-position-y: top; | |
background-repeat-x: no-repeat; | |
background-repeat-y: no-repeat; | |
background-color: #000; | |
} |
NewerOlder