├── .gitattributes ├── .editorconfig ├── readme.md └── license /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = tab 5 | end_of_line = lf 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # TypeScript Definition Style Guide 2 | 3 | > Style guide for adding type definitions to my npm packages 4 | 5 | *Open an issue if anything is unclear or if you have ideas for other checklist items.* 6 | 7 | This style guide assumes your package is native ESM. 8 | 9 | ## Checklist 10 | 11 | - Use tab-indentation and semicolons. 12 | - The definition should target the latest TypeScript version. 13 | - Exported properties/methods should be documented (see below). 14 | - The definition should be tested (see below). 15 | - When you have to use Node.js types, install the `@types/node` package as a dev dependency. **Do not** add a `/// ` triple-slash reference to the top of the definition file. 16 | - Third-party library types (everything in the `@types/*` namespace) must be installed as direct dependencies, if required. Use imports, not triple-slash references. 17 | - Ensure you're not falling for any of the [common mistakes](https://github.com/DefinitelyTyped/DefinitelyTyped/#common-mistakes). 18 | - For packages with a default export, use `export default function foo(…)` syntax. 19 | - Do not use `namespace`. 20 | - Use the name `"types"` and not `"typings"` for the TypeScript definition field in package.json. 21 | - Place `"types"` in package.json after all official package properties, but before custom properties, preferably after `"dependencies"` and/or `"devDependencies"`. 22 | - If the entry file in the package is named `index.js`, name the type definition file `index.d.ts` and put it in root.\ 23 | You don't need to add a `types` field to package.json as TypeScript will infer it from the name. 24 | - Add the type definition file to the `files` field in package.json. 25 | - The pull request should have the title `Add TypeScript definition`. *(Copy-paste it so you don't get it wrong)* 26 | - **Help review [other pull requests](https://github.com/search?q=user%3Asindresorhus+is%3Apr+is%3Aopen+%22Add+TypeScript+definition%22&type=Issues) that adds a type definition.** 27 | 28 | Check out [this](https://github.com/sindresorhus/filled-array/commit/aae7539cb32f163cb063499664b012d0b04b3104), [this](https://github.com/sindresorhus/write-json-file/blob/main/index.d.ts), and [this](https://github.com/sindresorhus/delay/blob/main/index.d.ts) example for how it should be done. 29 | 30 | ### Types 31 | 32 | - Types should not have namespaced names; `type Options {}`, not `type FooOptions {}`, unless there are multiple `Options` interfaces. 33 | - Use the array shorthand type notation; `number[]`, not `Array`. 34 | - Use the `readonly number[]` notation; not `ReadonlyArray`. 35 | - Prefer using the [`unknown` type](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-0.html#new-unknown-top-type) instead of `any` whenever possible. 36 | - Don't use abbreviation for type/variable/function names; `function foo(options: Options)`, not `function foo(opts: Opts)`. 37 | - When there are more than one [generic type variable](https://www.typescriptlang.org/docs/handbook/generics.html#working-with-generic-type-variables) in a method, they should have descriptive names; `type Mapper = …`, not `type Mapper = …`. 38 | - Don't prefix the name of interfaces with `I`; `Options`, not `IOptions`. 39 | - Imports, destructuring, and object literals should *not* have spaces around the identifier; `{foo}`, not `{ foo }`. 40 | - Don't use permissive types like `object` or `Function`. Use specific type-signatures like `Record` or `(input: string) => boolean;`. 41 | - Use `Record` for accepting objects with string index type and `Record` for returning such objects. The reason `any` is used for assignment is that TypeScript has special behavior for it: 42 | > The index signature `Record` in TypeScript behaves specially: it’s a valid assignment target for any object type. This is a special rule, since types with index signatures don’t normally produce this behavior. 43 | 44 | #### Prefer read-only values 45 | 46 | Make something read-only when it's not meant to be modified. This is usually the case for return values and option interfaces. Get familiar with the `readonly` keyword for [properties](https://www.typescriptlang.org/docs/handbook/interfaces.html#readonly-properties) and [array/tuple types](https://github.com/Microsoft/TypeScript/wiki/What's-new-in-TypeScript#improvements-for-readonlyarray-and-readonly-tuples). There's also a [`Readonly` type](https://basarat.gitbooks.io/typescript/docs/types/readonly.html) to mark all properties as `readonly`. 47 | 48 | Before: 49 | 50 | ```ts 51 | type Point = { 52 | x: number; 53 | y: number; 54 | children: Point[]; 55 | }; 56 | ``` 57 | 58 | After: 59 | 60 | ```ts 61 | type Point = { 62 | readonly x: number; 63 | readonly y: number; 64 | readonly children: readonly Point[]; 65 | }; 66 | ``` 67 | 68 | #### Import types explicitly 69 | 70 | Don't use implicit global types except for built-ins or when they can't be imported. 71 | 72 | Before: 73 | 74 | ```ts 75 | export function getWindow(): Electron.BrowserWindow; 76 | ``` 77 | 78 | After: 79 | 80 | ```ts 81 | import {BrowserWindow} from 'electron'; 82 | 83 | export function getWindow(): BrowserWindow; 84 | ``` 85 | 86 | #### Readable named imports 87 | 88 | Use a readable name when using named imports. 89 | 90 | Before: 91 | 92 | ```ts 93 | import {Writable} from 'node:stream'; 94 | ``` 95 | 96 | After: 97 | 98 | ```ts 99 | import {Writable as WritableStream} from 'node:stream'; 100 | ``` 101 | 102 | ### Documentation 103 | 104 | Exported definitions should be documented with [TSDoc](https://github.com/Microsoft/tsdoc). You can borrow text from the readme. 105 | 106 | Example: 107 | 108 | ```ts 109 | export type Options = { 110 | /** 111 | Allow negative numbers. 112 | 113 | @default true 114 | */ 115 | readonly allowNegative?: boolean; 116 | 117 | /** 118 | Has the ultimate foo. 119 | 120 | Note: Only use this for good. 121 | 122 | @default false 123 | */ 124 | readonly hasFoo?: boolean; 125 | 126 | /** 127 | Where to save. 128 | 129 | Default: [User's downloads directory](https://example.com) 130 | 131 | @example 132 | ``` 133 | import add from 'add'; 134 | 135 | add(1, 2, {saveDirectory: '/my/awesome/dir'}) 136 | ``` 137 | */ 138 | readonly saveDirectory?: string; 139 | }; 140 | 141 | /** 142 | Add two numbers together. 143 | 144 | @param x - The first number to add. 145 | @param y - The second number to add. 146 | @returns The sum of `x` and `y`. 147 | */ 148 | export default function add(x: number, y: number, options?: Options): number; 149 | ``` 150 | 151 | Note: 152 | 153 | - Don't prefix lines with `*`. 154 | - Don't [hard-wrap](https://stackoverflow.com/questions/319925/difference-between-hard-wrap-and-soft-wrap). 155 | - Put an empty line between type entries. 156 | - Sentences should start with an uppercase character and end in a dot. 157 | - There's an empty line after the function description. 158 | - Parameters and the return value should be documented. 159 | - There's a dash after the parameter name. 160 | - `@param` should not include the parameter type. 161 | - If the parameter description just repeats the parameter name, leave it out. 162 | - If the parameter is `options` it doesn't need a description. 163 | - If the function returns `void` or a wrapped `void` like `Promise`, leave out `@returns`. 164 | - If you include an `@example`, there should be a newline above it. The example itself should be wrapped with triple backticks (```` ``` ````). 165 | - If the API accepts an options-object, define an `Options` type as seen above. Document default option values using the [`@default` tag](https://jsdoc.app/tags-default.html) (since type cannot have default values). If the default needs to be a description instead of a basic value, use the formatting `Default: Lorem Ipsum.`. 166 | - Use `@returns`, not `@return`. 167 | - Ambient declarations can't have default parameters, so in the case of a default method parameter, document it in the parameter docs instead, as seen in the above example. 168 | - `@returns` should not duplicate the type information unless it's impossible to describe it without. 169 | - `@returns A boolean of whether it was enabled.` → `@returns Whether it was enabled.` 170 | 171 | #### Code examples 172 | 173 | - Include as many code examples as possible. Borrow from the readme. 174 | - Code examples should be fully functional and should include the import statement. 175 | 176 | ### Testing 177 | 178 | The type definition should be tested with [`tsd`](https://github.com/SamVerschueren/tsd). [Example of how to integrate it.](https://github.com/sindresorhus/filled-array/commit/aae7539cb32f163cb063499664b012d0b04b3104) 179 | 180 | Example: 181 | 182 | ```ts 183 | import {expectType} from 'tsd'; 184 | import delay from './index.js'; 185 | 186 | expectType>(delay(200)); 187 | 188 | expectType>(delay(200, {value: '🦄'})); 189 | expectType>(delay(200, {value: 0})); 190 | 191 | expectType>(delay.reject(200, {value: '🦄'})); 192 | expectType>(delay.reject(200, {value: 0})); 193 | ``` 194 | 195 | When it makes sense, also add a negative test using [`expectError()`](https://github.com/SamVerschueren/tsd#expecterrorfunction). 196 | 197 | Note: 198 | 199 | - The test file should be named `index.test-d.ts`. 200 | - `tsd` supports top-level `await`. 201 | - When testing promise-returning functions, don't use the `await` keyword. Instead, directly assert for a `Promise`, like in the example above. When you use `await`, your function can potentially return a bare value without being wrapped in a `Promise`, since `await` will happily accept non-`Promise` values, rendering your test meaningless. 202 | - Use [`const` assertions](https://github.com/Microsoft/TypeScript/wiki/What's-new-in-TypeScript#const-assertions) when you need to pass literal or readonly typed values to functions in your tests. 203 | -------------------------------------------------------------------------------- /license: -------------------------------------------------------------------------------- 1 | Creative Commons Attribution 4.0 International (CC-BY-4.0) 2 | 3 | Copyright (c) Sindre Sorhus (sindresorhus.com) 4 | 5 | ======================================================================= 6 | 7 | Creative Commons Corporation ("Creative Commons") is not a law firm and 8 | does not provide legal services or legal advice. Distribution of 9 | Creative Commons public licenses does not create a lawyer-client or 10 | other relationship. Creative Commons makes its licenses and related 11 | information available on an "as-is" basis. Creative Commons gives no 12 | warranties regarding its licenses, any material licensed under their 13 | terms and conditions, or any related information. Creative Commons 14 | disclaims all liability for damages resulting from their use to the 15 | fullest extent possible. 16 | 17 | Using Creative Commons Public Licenses 18 | 19 | Creative Commons public licenses provide a standard set of terms and 20 | conditions that creators and other rights holders may use to share 21 | original works of authorship and other material subject to copyright 22 | and certain other rights specified in the public license below. The 23 | following considerations are for informational purposes only, are not 24 | exhaustive, and do not form part of our licenses. 25 | 26 | Considerations for licensors: Our public licenses are 27 | intended for use by those authorized to give the public 28 | permission to use material in ways otherwise restricted by 29 | copyright and certain other rights. Our licenses are 30 | irrevocable. Licensors should read and understand the terms 31 | and conditions of the license they choose before applying it. 32 | Licensors should also secure all rights necessary before 33 | applying our licenses so that the public can reuse the 34 | material as expected. Licensors should clearly mark any 35 | material not subject to the license. This includes other CC- 36 | licensed material, or material used under an exception or 37 | limitation to copyright. More considerations for licensors: 38 | wiki.creativecommons.org/Considerations_for_licensors 39 | 40 | Considerations for the public: By using one of our public 41 | licenses, a licensor grants the public permission to use the 42 | licensed material under specified terms and conditions. If 43 | the licensor's permission is not necessary for any reason--for 44 | example, because of any applicable exception or limitation to 45 | copyright--then that use is not regulated by the license. Our 46 | licenses grant only permissions under copyright and certain 47 | other rights that a licensor has authority to grant. Use of 48 | the licensed material may still be restricted for other 49 | reasons, including because others have copyright or other 50 | rights in the material. A licensor may make special requests, 51 | such as asking that all changes be marked or described. 52 | Although not required by our licenses, you are encouraged to 53 | respect those requests where reasonable. More considerations 54 | for the public: 55 | wiki.creativecommons.org/Considerations_for_licensees 56 | 57 | ======================================================================= 58 | 59 | Creative Commons Attribution 4.0 International Public License 60 | 61 | By exercising the Licensed Rights (defined below), You accept and agree 62 | to be bound by the terms and conditions of this Creative Commons 63 | Attribution 4.0 International Public License ("Public License"). To the 64 | extent this Public License may be interpreted as a contract, You are 65 | granted the Licensed Rights in consideration of Your acceptance of 66 | these terms and conditions, and the Licensor grants You such rights in 67 | consideration of benefits the Licensor receives from making the 68 | Licensed Material available under these terms and conditions. 69 | 70 | 71 | Section 1 -- Definitions. 72 | 73 | a. Adapted Material means material subject to Copyright and Similar 74 | Rights that is derived from or based upon the Licensed Material 75 | and in which the Licensed Material is translated, altered, 76 | arranged, transformed, or otherwise modified in a manner requiring 77 | permission under the Copyright and Similar Rights held by the 78 | Licensor. For purposes of this Public License, where the Licensed 79 | Material is a musical work, performance, or sound recording, 80 | Adapted Material is always produced where the Licensed Material is 81 | synched in timed relation with a moving image. 82 | 83 | b. Adapter's License means the license You apply to Your Copyright 84 | and Similar Rights in Your contributions to Adapted Material in 85 | accordance with the terms and conditions of this Public License. 86 | 87 | c. Copyright and Similar Rights means copyright and/or similar rights 88 | closely related to copyright including, without limitation, 89 | performance, broadcast, sound recording, and Sui Generis Database 90 | Rights, without regard to how the rights are labeled or 91 | categorized. For purposes of this Public License, the rights 92 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 93 | Rights. 94 | 95 | d. Effective Technological Measures means those measures that, in the 96 | absence of proper authority, may not be circumvented under laws 97 | fulfilling obligations under Article 11 of the WIPO Copyright 98 | Treaty adopted on December 20, 1996, and/or similar international 99 | agreements. 100 | 101 | e. Exceptions and Limitations means fair use, fair dealing, and/or 102 | any other exception or limitation to Copyright and Similar Rights 103 | that applies to Your use of the Licensed Material. 104 | 105 | f. Licensed Material means the artistic or literary work, database, 106 | or other material to which the Licensor applied this Public 107 | License. 108 | 109 | g. Licensed Rights means the rights granted to You subject to the 110 | terms and conditions of this Public License, which are limited to 111 | all Copyright and Similar Rights that apply to Your use of the 112 | Licensed Material and that the Licensor has authority to license. 113 | 114 | h. Licensor means the individual(s) or entity(ies) granting rights 115 | under this Public License. 116 | 117 | i. Share means to provide material to the public by any means or 118 | process that requires permission under the Licensed Rights, such 119 | as reproduction, public display, public performance, distribution, 120 | dissemination, communication, or importation, and to make material 121 | available to the public including in ways that members of the 122 | public may access the material from a place and at a time 123 | individually chosen by them. 124 | 125 | j. Sui Generis Database Rights means rights other than copyright 126 | resulting from Directive 96/9/EC of the European Parliament and of 127 | the Council of 11 March 1996 on the legal protection of databases, 128 | as amended and/or succeeded, as well as other essentially 129 | equivalent rights anywhere in the world. 130 | 131 | k. You means the individual or entity exercising the Licensed Rights 132 | under this Public License. Your has a corresponding meaning. 133 | 134 | 135 | Section 2 -- Scope. 136 | 137 | a. License grant. 138 | 139 | 1. Subject to the terms and conditions of this Public License, 140 | the Licensor hereby grants You a worldwide, royalty-free, 141 | non-sublicensable, non-exclusive, irrevocable license to 142 | exercise the Licensed Rights in the Licensed Material to: 143 | 144 | a. reproduce and Share the Licensed Material, in whole or 145 | in part; and 146 | 147 | b. produce, reproduce, and Share Adapted Material. 148 | 149 | 2. Exceptions and Limitations. For the avoidance of doubt, where 150 | Exceptions and Limitations apply to Your use, this Public 151 | License does not apply, and You do not need to comply with 152 | its terms and conditions. 153 | 154 | 3. Term. The term of this Public License is specified in Section 155 | 6(a). 156 | 157 | 4. Media and formats; technical modifications allowed. The 158 | Licensor authorizes You to exercise the Licensed Rights in 159 | all media and formats whether now known or hereafter created, 160 | and to make technical modifications necessary to do so. The 161 | Licensor waives and/or agrees not to assert any right or 162 | authority to forbid You from making technical modifications 163 | necessary to exercise the Licensed Rights, including 164 | technical modifications necessary to circumvent Effective 165 | Technological Measures. For purposes of this Public License, 166 | simply making modifications authorized by this Section 2(a) 167 | (4) never produces Adapted Material. 168 | 169 | 5. Downstream recipients. 170 | 171 | a. Offer from the Licensor -- Licensed Material. Every 172 | recipient of the Licensed Material automatically 173 | receives an offer from the Licensor to exercise the 174 | Licensed Rights under the terms and conditions of this 175 | Public License. 176 | 177 | b. No downstream restrictions. You may not offer or impose 178 | any additional or different terms or conditions on, or 179 | apply any Effective Technological Measures to, the 180 | Licensed Material if doing so restricts exercise of the 181 | Licensed Rights by any recipient of the Licensed 182 | Material. 183 | 184 | 6. No endorsement. Nothing in this Public License constitutes or 185 | may be construed as permission to assert or imply that You 186 | are, or that Your use of the Licensed Material is, connected 187 | with, or sponsored, endorsed, or granted official status by, 188 | the Licensor or others designated to receive attribution as 189 | provided in Section 3(a)(1)(A)(i). 190 | 191 | b. Other rights. 192 | 193 | 1. Moral rights, such as the right of integrity, are not 194 | licensed under this Public License, nor are publicity, 195 | privacy, and/or other similar personality rights; however, to 196 | the extent possible, the Licensor waives and/or agrees not to 197 | assert any such rights held by the Licensor to the limited 198 | extent necessary to allow You to exercise the Licensed 199 | Rights, but not otherwise. 200 | 201 | 2. Patent and trademark rights are not licensed under this 202 | Public License. 203 | 204 | 3. To the extent possible, the Licensor waives any right to 205 | collect royalties from You for the exercise of the Licensed 206 | Rights, whether directly or through a collecting society 207 | under any voluntary or waivable statutory or compulsory 208 | licensing scheme. In all other cases the Licensor expressly 209 | reserves any right to collect such royalties. 210 | 211 | 212 | Section 3 -- License Conditions. 213 | 214 | Your exercise of the Licensed Rights is expressly made subject to the 215 | following conditions. 216 | 217 | a. Attribution. 218 | 219 | 1. If You Share the Licensed Material (including in modified 220 | form), You must: 221 | 222 | a. retain the following if it is supplied by the Licensor 223 | with the Licensed Material: 224 | 225 | i. identification of the creator(s) of the Licensed 226 | Material and any others designated to receive 227 | attribution, in any reasonable manner requested by 228 | the Licensor (including by pseudonym if 229 | designated); 230 | 231 | ii. a copyright notice; 232 | 233 | iii. a notice that refers to this Public License; 234 | 235 | iv. a notice that refers to the disclaimer of 236 | warranties; 237 | 238 | v. a URI or hyperlink to the Licensed Material to the 239 | extent reasonably practicable; 240 | 241 | b. indicate if You modified the Licensed Material and 242 | retain an indication of any previous modifications; and 243 | 244 | c. indicate the Licensed Material is licensed under this 245 | Public License, and include the text of, or the URI or 246 | hyperlink to, this Public License. 247 | 248 | 2. You may satisfy the conditions in Section 3(a)(1) in any 249 | reasonable manner based on the medium, means, and context in 250 | which You Share the Licensed Material. For example, it may be 251 | reasonable to satisfy the conditions by providing a URI or 252 | hyperlink to a resource that includes the required 253 | information. 254 | 255 | 3. If requested by the Licensor, You must remove any of the 256 | information required by Section 3(a)(1)(A) to the extent 257 | reasonably practicable. 258 | 259 | 4. If You Share Adapted Material You produce, the Adapter's 260 | License You apply must not prevent recipients of the Adapted 261 | Material from complying with this Public License. 262 | 263 | 264 | Section 4 -- Sui Generis Database Rights. 265 | 266 | Where the Licensed Rights include Sui Generis Database Rights that 267 | apply to Your use of the Licensed Material: 268 | 269 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 270 | to extract, reuse, reproduce, and Share all or a substantial 271 | portion of the contents of the database; 272 | 273 | b. if You include all or a substantial portion of the database 274 | contents in a database in which You have Sui Generis Database 275 | Rights, then the database in which You have Sui Generis Database 276 | Rights (but not its individual contents) is Adapted Material; and 277 | 278 | c. You must comply with the conditions in Section 3(a) if You Share 279 | all or a substantial portion of the contents of the database. 280 | 281 | For the avoidance of doubt, this Section 4 supplements and does not 282 | replace Your obligations under this Public License where the Licensed 283 | Rights include other Copyright and Similar Rights. 284 | 285 | 286 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 287 | 288 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 289 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 290 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 291 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 292 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 293 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 294 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 295 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 296 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 297 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 298 | 299 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 300 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 301 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 302 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 303 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 304 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 305 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 306 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 307 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 308 | 309 | c. The disclaimer of warranties and limitation of liability provided 310 | above shall be interpreted in a manner that, to the extent 311 | possible, most closely approximates an absolute disclaimer and 312 | waiver of all liability. 313 | 314 | 315 | Section 6 -- Term and Termination. 316 | 317 | a. This Public License applies for the term of the Copyright and 318 | Similar Rights licensed here. However, if You fail to comply with 319 | this Public License, then Your rights under this Public License 320 | terminate automatically. 321 | 322 | b. Where Your right to use the Licensed Material has terminated under 323 | Section 6(a), it reinstates: 324 | 325 | 1. automatically as of the date the violation is cured, provided 326 | it is cured within 30 days of Your discovery of the 327 | violation; or 328 | 329 | 2. upon express reinstatement by the Licensor. 330 | 331 | For the avoidance of doubt, this Section 6(b) does not affect any 332 | right the Licensor may have to seek remedies for Your violations 333 | of this Public License. 334 | 335 | c. For the avoidance of doubt, the Licensor may also offer the 336 | Licensed Material under separate terms or conditions or stop 337 | distributing the Licensed Material at any time; however, doing so 338 | will not terminate this Public License. 339 | 340 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 341 | License. 342 | 343 | 344 | Section 7 -- Other Terms and Conditions. 345 | 346 | a. The Licensor shall not be bound by any additional or different 347 | terms or conditions communicated by You unless expressly agreed. 348 | 349 | b. Any arrangements, understandings, or agreements regarding the 350 | Licensed Material not stated herein are separate from and 351 | independent of the terms and conditions of this Public License. 352 | 353 | 354 | Section 8 -- Interpretation. 355 | 356 | a. For the avoidance of doubt, this Public License does not, and 357 | shall not be interpreted to, reduce, limit, restrict, or impose 358 | conditions on any use of the Licensed Material that could lawfully 359 | be made without permission under this Public License. 360 | 361 | b. To the extent possible, if any provision of this Public License is 362 | deemed unenforceable, it shall be automatically reformed to the 363 | minimum extent necessary to make it enforceable. If the provision 364 | cannot be reformed, it shall be severed from this Public License 365 | without affecting the enforceability of the remaining terms and 366 | conditions. 367 | 368 | c. No term or condition of this Public License will be waived and no 369 | failure to comply consented to unless expressly agreed to by the 370 | Licensor. 371 | 372 | d. Nothing in this Public License constitutes or may be interpreted 373 | as a limitation upon, or waiver of, any privileges and immunities 374 | that apply to the Licensor or You, including from the legal 375 | processes of any jurisdiction or authority. 376 | 377 | 378 | ======================================================================= 379 | 380 | Creative Commons is not a party to its public 381 | licenses. Notwithstanding, Creative Commons may elect to apply one of 382 | its public licenses to material it publishes and in those instances 383 | will be considered the “Licensor.” The text of the Creative Commons 384 | public licenses is dedicated to the public domain under the CC0 Public 385 | Domain Dedication. Except for the limited purpose of indicating that 386 | material is shared under a Creative Commons public license or as 387 | otherwise permitted by the Creative Commons policies published at 388 | creativecommons.org/policies, Creative Commons does not authorize the 389 | use of the trademark "Creative Commons" or any other trademark or logo 390 | of Creative Commons without its prior written consent including, 391 | without limitation, in connection with any unauthorized modifications 392 | to any of its public licenses or any other arrangements, 393 | understandings, or agreements concerning use of licensed material. For 394 | the avoidance of doubt, this paragraph does not form part of the 395 | public licenses. 396 | 397 | Creative Commons may be contacted at creativecommons.org. 398 | --------------------------------------------------------------------------------