mirror of
				https://github.com/AmberGraceRblx/luau-promise.git
				synced 2025-11-04 03:59:17 +00:00 
			
		
		
		
	
							parent
							
								
									0dbd4d8f1b
								
							
						
					
					
						commit
						e23601b924
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -11,7 +11,7 @@ Here's quick introduction to Promises. For more complete information, check out
 | 
				
			||||||
There are a few ways to create a Promise. The most common way is to call [Promise.new](/api/Promise#new):
 | 
					There are a few ways to create a Promise. The most common way is to call [Promise.new](/api/Promise#new):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```lua
 | 
					```lua
 | 
				
			||||||
local myFunction()
 | 
					local function myFunction()
 | 
				
			||||||
	return Promise.new(function(resolve, reject, onCancel)
 | 
						return Promise.new(function(resolve, reject, onCancel)
 | 
				
			||||||
		somethingThatYields()
 | 
							somethingThatYields()
 | 
				
			||||||
		resolve("Hello world!")
 | 
							resolve("Hello world!")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue